* directory or online at http://www.openafs.org/dl/license10.html
*/
-#if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
-#endif
/*******************************************************************\
* *
* Information Technology Center *
#if !defined(KERNEL) && !defined(_KMEMUSER) && !defined(AFS_PTHREAD_ENV)
#include <afs/param.h>
+#ifdef HAVE_UCONTEXT_H
+#include <ucontext.h>
+#else
#include <setjmp.h>
+#endif
#define LWP_SUCCESS 0
#define LWP_EBADPID -1
#else
struct lwp_context { /* saved context for dispatcher */
char *topstack; /* ptr to top of process stack */
-#ifdef sparc
-#ifdef save_allregs
+#ifdef HAVE_UCONTEXT_H
+ ucontext_t ucontext;
+ int state;
+#else /* !HAVE_UCONTEXT_H */
+# if defined(sparc) && !defined(__linux__)
+# ifdef save_allregs
int globals[7+1+32+2+32+2]; /* g1-g7, y reg, f0-f31, fsr, fq, c0-c31, csr, cq. */
-#else
+# else
int globals[8]; /* g1-g7 and y registers. */
-#endif
-#endif
+# endif
+# endif
jmp_buf setjmp_buffer;
+#endif /* HAVE_UCONTEXT_H */
};
struct rock
/* External function declarations. */
#ifdef AFS_NT40_ENV
+#ifndef _MFC_VER /*skip if doing Microsoft foundation class*/
#include <winsock2.h>
+#endif
#elif defined(AFS_LINUX20_ENV)
#include <unistd.h>
#include <time.h>
extern int IOMGR_Cancel(PROCESS pid);
extern int IOMGR_Initialize(void);
extern void IOMGR_FreeFDSet(fd_set * fds);
-static void SignalTimeout(int code, struct timeval *timeout);
+extern int IOMGR_SoftSig( int (*aproc)(), char *arock);
+
/* fasttime.c */
extern int FT_GetTimeOfDay(struct timeval *tv, struct timezone *tz);
extern int LWP_INTERNALSIGNAL(void *event, int yield);
extern int LWP_QWait(void);
extern int LWP_QSignal(PROCESS pid);
+#else
+extern int LWP_CurrentProcess();
+extern int LWP_INTERNALSIGNAL();
+extern int LWP_InitializeProcessSupport();
+extern int LWP_CreateProcess();
+extern int LWP_DestroyProcess();
+extern int LWP_WaitProcess();
+extern PROCESS LWP_ThreadId();
#endif
/* max time we are allowed to spend in a select call on NT */
#define IOMGR_MAXWAITTIME 5 /* seconds */
+/* max time we spend on a select in a Win95 DOS box */
+#define IOMGR_WIN95WAITTIME 5000 /* microseconds */
+
#endif /* __LWP_INCLUDE_ */
#endif /* !KERNEL && !_KMEMUSER */