summaryrefslogtreecommitdiff
path: root/sched.h
diff options
context:
space:
mode:
authorrpj <rpj>2002-02-23 02:01:11 +0000
committerrpj <rpj>2002-02-23 02:01:11 +0000
commitd2b870cd9b6d91261a304e156819571acc309b55 (patch)
tree4b56dbc20070a24a90c123daadc35ab628f21e8c /sched.h
parent09cf57ffcf96b3f0cf7d5ec959c455ba54245a65 (diff)
* pthread_cond_destroy.c: Expand the time change
critical section to solve deadlock problem. * pthread.c: Add all remaining C modules. * pthread.h: Use dllexport/dllimport attributes on functions to avoid using pthread.def. * sched.h: Likewise. * semaphore.h: Likewise. * GNUmakefile: Add new targets for single translation unit build to maximise inlining potential; generate pthread.def automatically. * Makefile: Likewise, but no longer uses pthread.def.
Diffstat (limited to 'sched.h')
-rw-r--r--sched.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/sched.h b/sched.h
index c1ba3bf..f6a732d 100644
--- a/sched.h
+++ b/sched.h
@@ -65,6 +65,24 @@
/* Include everything */
#endif
+
+#if __GNUC__ && ! defined (__declspec)
+# error Please upgrade your GNU compiler to one that supports __declspec.
+#endif
+
+/*
+ * When building the DLL code, you should define PTW32_BUILD so that
+ * the variables/functions are exported correctly. When using the DLL,
+ * do NOT define PTW32_BUILD, and then the variables/functions will
+ * be imported correctly.
+ */
+#ifdef PTW32_BUILD
+# define PTW32_DLLPORT __declspec (dllexport)
+#else
+# define PTW32_DLLPORT __declspec (dllimport)
+#endif
+
+
#if defined(__MINGW32__) || defined(_UWIN)
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
/* For pid_t */
@@ -95,15 +113,15 @@ extern "C"
{
#endif /* __cplusplus */
-int sched_yield (void);
+PTW32_DLLPORT int sched_yield (void);
-int sched_get_priority_min (int policy);
+PTW32_DLLPORT int sched_get_priority_min (int policy);
-int sched_get_priority_max (int policy);
+PTW32_DLLPORT int sched_get_priority_max (int policy);
-int sched_setscheduler (pid_t pid, int policy);
+PTW32_DLLPORT int sched_setscheduler (pid_t pid, int policy);
-int sched_getscheduler (pid_t pid);
+PTW32_DLLPORT int sched_getscheduler (pid_t pid);
/*
* Note that this macro returns ENOTSUP rather than