]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/uclibc/lib/contrib/uclibc/libc/signal/allocrtsig.c
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / signal / allocrtsig.c
index 3c7d6211bc59ba52f195f37f21f79632a17ff4de..9744187612b63af8a1147e078444a823d435ced1 100644 (file)
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <features.h>
 #include <signal.h>
-#include <sys/types.h>
 #include <sys/syscall.h>
 
 /* Only enable rt signals when it is supported at compile time */
@@ -34,6 +32,13 @@ static int current_rtmax = -1;
 #else
 # ifdef __UCLIBC_HAS_THREADS_NATIVE__
 static int current_rtmin = __SIGRTMIN + 2;
+# elif defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
+/* psm: might be good for LT old as well, do not want to break it for now */
+/* Sanity check */
+#  if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3
+#   error "This must not happen"
+#  endif
+static int current_rtmin = __SIGRTMIN + 3;
 # else
 static int current_rtmin = __SIGRTMIN;
 # endif
@@ -52,6 +57,7 @@ int __libc_current_sigrtmax (void)
   return current_rtmax;
 }
 
+#if 0
 /* Allocate real-time signal with highest/lowest available
    priority.  Please note that we don't use a lock since we assume
    this function to be called at program start.  */
@@ -64,3 +70,4 @@ int __libc_allocate_rtsig (int high)
 
   return high ? current_rtmin++ : current_rtmax--;
 }
+#endif