59 |
# endif |
# endif |
60 |
# endif |
# endif |
61 |
|
|
|
#ifdef GUILE_ISELECT |
|
62 |
#include "libguile/iselect.h" |
#include "libguile/iselect.h" |
|
#endif |
|
63 |
|
|
64 |
#if HAVE_WINSOCK2_H |
#if HAVE_WINSOCK2_H |
65 |
#include <winsock2.h> |
#include <winsock2.h> |
104 |
|
|
105 |
SCM handle; /* SCM handle, protected via scm_all_threads. */ |
SCM handle; /* SCM handle, protected via scm_all_threads. */ |
106 |
|
|
|
#ifdef GUILE_ISELECT |
|
107 |
int nfds; |
int nfds; |
108 |
SELECT_TYPE *readfds; |
SELECT_TYPE *readfds; |
109 |
SELECT_TYPE *writefds; |
SELECT_TYPE *writefds; |
112 |
struct timeval wakeup_time; /* Time to stop sleeping */ |
struct timeval wakeup_time; /* Time to stop sleeping */ |
113 |
int _errno; |
int _errno; |
114 |
int retval; |
int retval; |
|
#else |
|
|
time_t wakeup_time; /* Time to stop sleeping */ |
|
|
#endif |
|
115 |
|
|
116 |
#ifdef GUILE_PTHREAD_COMPAT |
#ifdef GUILE_PTHREAD_COMPAT |
117 |
pthread_t dummy_thread; |
pthread_t dummy_thread; |
197 |
iselect.h, but they use coop_t, defined above, which uses things |
iselect.h, but they use coop_t, defined above, which uses things |
198 |
defined in iselect.h. Basically, we're making at best a flailing |
defined in iselect.h. Basically, we're making at best a flailing |
199 |
(and failing) attempt at modularity here, and I don't have time to |
(and failing) attempt at modularity here, and I don't have time to |
200 |
rethink this at the moment. This code awaits a Hero. --JimB */ |
rethink this at the moment. This code awaits a Hero. --JimB |
201 |
#ifdef GUILE_ISELECT |
*/ |
202 |
SCM_API void coop_timeout_qinsert (coop_q_t *, coop_t *); |
SCM_API void coop_timeout_qinsert (coop_q_t *, coop_t *); |
|
#endif |
|
203 |
SCM_API coop_t *coop_next_runnable_thread (void); |
SCM_API coop_t *coop_next_runnable_thread (void); |
204 |
SCM_API coop_t *coop_wait_for_runnable_thread_now (struct timeval *); |
SCM_API coop_t *coop_wait_for_runnable_thread_now (struct timeval *); |
205 |
SCM_API coop_t *coop_wait_for_runnable_thread (void); |
SCM_API coop_t *coop_wait_for_runnable_thread (void); |