Displaying 1 result from an estimated 1 matches for "authrequestqueu".
Did you mean:
  authrequestqueue
  
2012 Mar 11
2
[patch] Threading support in ssh-agent
...EAD
+    , AUTH_INUSE
+#endif
 } sock_type;
 
 typedef struct {
@@ -137,6 +145,50 @@
 /* Default lifetime (0 == forever) */
 static int lifetime = 0;
 
+#ifdef HAVE_LIBPTHREAD
+
+#define MAX_THREADS 20
+
+#define REQ_QUEUE_LEN (MAX_THREADS * 2)
+
+typedef void (*AuthWorker)(SocketEntry*);
+
+struct AuthRequestQueueEntry {
+	AuthWorker worker;
+	SocketEntry *e;
+};
+
+struct AuthRequestQueue {
+	struct AuthRequestQueueEntry queue[REQ_QUEUE_LEN];
+	int first;
+	int used;
+	int inprogress; /* operated by get() */
+	pthread_mutex_t lock;
+	pthread_cond_t cond;
+};
+
+struct Thread {
+	pthread_t tid;
+	pthread_mu...