1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #include <signal.h>
- #if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3
- # error "This must not happen"
- #endif
- static int current_rtmin;
- static int current_rtmax;
- static int initialized;
- #include <testrtsig.h>
- static void
- init (void)
- {
- if (!kernel_has_rtsig ())
- {
- current_rtmin = -1;
- current_rtmax = -1;
- }
- else
- {
- current_rtmin = __SIGRTMIN + 3;
- current_rtmax = __SIGRTMAX;
- }
- initialized = 1;
- }
- int
- __libc_current_sigrtmin (void)
- {
- if (!initialized)
- init ();
- return current_rtmin;
- }
- strong_alias (__libc_current_sigrtmin, __libc_current_sigrtmin_private)
- libc_hidden_def (__libc_current_sigrtmin)
- int
- __libc_current_sigrtmax (void)
- {
- if (!initialized)
- init ();
- return current_rtmax;
- }
- strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private)
- libc_hidden_def (__libc_current_sigrtmax)
- #if 0
- int
- __libc_allocate_rtsig (int high)
- {
- if (!initialized)
- init ();
- if (current_rtmin == -1 || current_rtmin > current_rtmax)
-
- return -1;
- return high ? current_rtmin++ : current_rtmax--;
- }
- strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private)
- #endif
|