diff options
author | Jonathan Pryor <jpryor@novell.com> | 2008-12-19 18:23:37 +0300 |
---|---|---|
committer | Jonathan Pryor <jpryor@novell.com> | 2008-12-19 18:23:37 +0300 |
commit | 848c445e8e7593e47fca26065ea0ec2fc2529481 (patch) | |
tree | e7676d512f4ae63722048b82d0418f1fe4366224 /support | |
parent | 04279e46ee7601c3cb80db3b035b736d5789c89f (diff) |
* map.h: Flush.
* signal.c: Add Mono_Posix_SIGRTMIN(), Mono_Posix_SIGRTMAX(),
Mono_Posix_FromRealTimeSignum().
Patch thanks to tim.jenks@realtimeworlds.com.
svn path=/trunk/mono/; revision=121852
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 7 | ||||
-rw-r--r-- | support/map.h | 3 | ||||
-rw-r--r-- | support/signal.c | 33 |
3 files changed, 42 insertions, 1 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 14e52753189..e78587144f2 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,10 @@ +2008-12-19 Jonathan Pryor <jpryor@novell.com> + + * map.h: Flush. + * signal.c: Add Mono_Posix_SIGRTMIN(), Mono_Posix_SIGRTMAX(), + Mono_Posix_FromRealTimeSignum(). + Patch thanks to tim.jenks@realtimeworlds.com. + 2008-11-06 Alan McGovern <amcgovern@novell.com> * Makefile.am: Missed out on a header file for minizip diff --git a/support/map.h b/support/map.h index c913c60eb35..fbc063d59bc 100644 --- a/support/map.h +++ b/support/map.h @@ -1583,7 +1583,10 @@ int map_Mono_Posix_AccessMode (int mode); int map_Mono_Posix_FileMode (int mode); int map_Mono_Posix_OpenFlags (int flags); int map_Mono_Posix_WaitOptions (int wait_options); +int Mono_Posix_FromRealTimeSignum (int offset, int* rval); int Mono_Posix_FromStatvfs (struct Mono_Posix_Statvfs* source, void* destination); +int Mono_Posix_SIGRTMAX (void); +int Mono_Posix_SIGRTMIN (void); int Mono_Posix_Stdlib__IOFBF (void); int Mono_Posix_Stdlib__IOLBF (void); int Mono_Posix_Stdlib__IONBF (void); diff --git a/support/signal.c b/support/signal.c index 4ba92742af2..abf11038bb7 100644 --- a/support/signal.c +++ b/support/signal.c @@ -54,6 +54,37 @@ Mono_Posix_Stdlib_InvokeSignalHandler (int signum, void *handler) _h (signum); } +int Mono_Posix_SIGRTMIN (void) +{ +#ifdef SIGRTMIN + return SIGRTMIN; +#else /* def SIGRTMIN */ + return -1; +#endif /* ndef SIGRTMIN */ +} + +int Mono_Posix_SIGRTMAX (void) +{ +#ifdef SIGRTMAX + return SIGRTMAX; +#else /* def SIGRTMAX */ + return -1; +#endif /* ndef SIGRTMAX */ +} + +int Mono_Posix_FromRealTimeSignum (int offset, int *r) +{ + *r = 0; +#if defined (SIGRTMIN) && defined (SIGRTMAX) + if ((offset < 0) || (SIGRTMIN > SIGRTMAX - offset)) + return -1; + *r = SIGRTMIN+offset; + return 0; +#else + return -1; +#endif +} + #ifndef PLATFORM_WIN32 #ifdef WAPI_ATOMIC_ASM @@ -109,7 +140,7 @@ Mono_Unix_UnixSignal_install (int sig) int i, mr; signal_info* h = NULL; int have_handler = 0; - void* handler; + void* handler = NULL; mr = pthread_mutex_lock (&signals_mutex); if (mr != 0) { |