#include <process.h>
#include "misc.h"
#include "empthread.h"
+#include "file.h"
#include "prototypes.h"
#include "server.h"
#include "sys/socket.h"
empth_t *pThread = NULL;
loc_debug("creating new thread %s", name);
+ ef_make_stale();
pThread = malloc(sizeof(*pThread));
if (!pThread) {
empth_t *pThread = TlsGetValue(dwTLSIndex);
loc_debug("empth_exit");
+ ef_make_stale();
loc_BlockThisThread();
TlsSetValue(dwTLSIndex, NULL);
void
empth_yield(void)
{
+ ef_make_stale();
loc_BlockThisThread();
Sleep(0);
loc_RunThisThread(NULL);
loc_debug("%s select on %d",
flags == EMPTH_FD_READ ? "read" : "write", fd);
+ ef_make_stale();
loc_BlockThisThread();
hEventObject[0] = WSACreateEvent();
empth_t *pThread = TlsGetValue(dwTLSIndex);
DWORD result;
+ ef_make_stale();
loc_BlockThisThread();
do {
int
empth_wait_for_signal(void)
{
+ ef_make_stale();
loc_BlockThisThread();
loc_RunThisThread(hShutdownEvent);
return SIGTERM;
void
empth_rwlock_wrlock(empth_rwlock_t *rwlock)
{
+ ef_make_stale();
/* block any new readers */
ResetEvent(rwlock->can_read);
rwlock->nwrite++;
void
empth_rwlock_rdlock(empth_rwlock_t *rwlock)
{
+ ef_make_stale();
loc_BlockThisThread();
loc_RunThisThread(rwlock->can_read);
ResetEvent(rwlock->can_write);