[haiku-commits] r42081 - in haiku/branches/developer/bonefish/signals: headers/private/libroot src/system/libroot/posix/pthread src/system/libroot/posix/signal src/system/libroot/posix/sys

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 10 Jun 2011 11:00:27 +0200 (CEST)

Author: bonefish
Date: 2011-06-10 11:00:26 +0200 (Fri, 10 Jun 2011)
New Revision: 42081
Changeset: https://dev.haiku-os.org/changeset/42081

Added:
   
haiku/branches/developer/bonefish/signals/headers/private/libroot/signal_private.h
Removed:
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal_private.h
Modified:
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/pthread/pthread_once.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/Jamfile
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/set_signal_mask.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigaction.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sighold.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigignore.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/siginterrupt.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpause.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpending.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigrelse.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset_accessors.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigsuspend.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigwait.cpp
   
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/sys/select.c
Log:
Moved signal_private.h to headers/private/libroot.


Copied: 
haiku/branches/developer/bonefish/signals/headers/private/libroot/signal_private.h
 (from rev 41966, 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal_private.h)
===================================================================
--- 
haiku/branches/developer/bonefish/signals/headers/private/libroot/signal_private.h
                          (rev 0)
+++ 
haiku/branches/developer/bonefish/signals/headers/private/libroot/signal_private.h
  2011-06-10 09:00:26 UTC (rev 42081)
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2011, Ingo Weinhold, ingo_weinhold@xxxxxxx
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _LIBROOT_SIGNAL_PRIVATE_H
+#define _LIBROOT_SIGNAL_PRIVATE_H
+
+
+#include <signal.h>
+#include <sys/cdefs.h>
+
+#include <signal_defs.h>
+
+
+#define MAX_SIGNAL_NUMBER_BEOS         29
+
+
+typedef __haiku_int32 sigset_t_beos;
+
+struct sigaction_beos {
+       __sighandler_t  sa_handler;
+       sigset_t_beos   sa_mask;
+       int                             sa_flags;
+       void*                   sa_userdata;
+};
+
+
+static inline sigset_t_beos
+to_beos_sigset(sigset_t set)
+{
+       // restrict to BeOS signals
+       sigset_t_beos beosSet = (sigset_t_beos)(set
+               & SIGNAL_RANGE_TO_MASK(1, MAX_SIGNAL_NUMBER_BEOS));
+
+       // if SIGBUS is set, set SIGSEGV, since they have the same number in 
BeOS
+       if ((set & SIGNAL_TO_MASK(SIGBUS)) != 0)
+               beosSet |= SIGNAL_TO_MASK(SIGSEGV);
+
+       return beosSet;
+}
+
+
+static inline sigset_t
+from_beos_sigset(sigset_t_beos beosSet)
+{
+       sigset_t set = beosSet;
+
+       // if SIGSEGV is set, set SIGBUS, since they have the same number in 
BeOS
+       if ((set & SIGNAL_TO_MASK(SIGSEGV)) != 0)
+               set |= SIGNAL_TO_MASK(SIGBUS);
+
+       return set;
+}
+
+
+__BEGIN_DECLS
+
+
+__sighandler_t __signal_beos(int signal, __sighandler_t signalHandler);
+__sighandler_t __signal(int signal, __sighandler_t signalHandler);
+
+int __sigaction_beos(int signal, const struct sigaction_beos* beosAction,
+       struct sigaction_beos* beosOldAction);
+int __sigaction(int signal, const struct sigaction* action,
+       struct sigaction* oldAction);
+
+__sighandler_t __sigset_beos(int signal, __sighandler_t signalHandler);
+__sighandler_t __sigset(int signal, __sighandler_t signalHandler);
+
+int __sigignore_beos(int signal);
+int __sigignore(int signal);
+
+int __sighold_beos(int signal);
+int __sighold(int signal);
+
+int __sigrelse_beos(int signal);
+int __sigrelse(int signal);
+
+int __sigpause_beos(int signal);
+int __sigpause(int signal);
+
+int __siginterrupt_beos(int signal, int flag);
+int __siginterrupt(int signal, int flag);
+
+int __pthread_sigmask_beos(int how, const sigset_t_beos* beosSet,
+       sigset_t_beos* beosOldSet);
+int __sigprocmask_beos(int how, const sigset_t_beos* beosSet,
+       sigset_t_beos* beosOldSet);
+
+int __pthread_sigmask(int how, const sigset_t* set, sigset_t* oldSet);
+int __sigprocmask(int how, const sigset_t* set, sigset_t* oldSet);
+
+int __sigpending_beos(sigset_t_beos* beosSet);
+int __sigpending(sigset_t* set);
+
+int __sigsuspend_beos(const sigset_t_beos* beosMask);
+int __sigsuspend(const sigset_t* mask);
+
+int __sigwait_beos(const sigset_t_beos* beosSet, int* _signal);
+int __sigwait(const sigset_t* set, int* _signal);
+
+int __sigemptyset_beos(sigset_t_beos* set);
+int __sigfillset_beos(sigset_t_beos* set);
+int __sigismember_beos(const sigset_t_beos* set, int signal);
+int __sigaddset_beos(sigset_t_beos* set, int signal);
+int __sigdelset_beos(sigset_t_beos* set, int signal);
+
+int __sigemptyset(sigset_t* set);
+int __sigfillset(sigset_t* set);
+int __sigismember(const sigset_t* set, int signal);
+int __sigaddset(sigset_t* set, int signal);
+int __sigdelset(sigset_t* set, int signal);
+
+
+__END_DECLS
+
+
+#endif // _LIBROOT_SIGNAL_PRIVATE_H

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/pthread/pthread_once.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/pthread/pthread_once.cpp
 2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/pthread/pthread_once.cpp
 2011-06-10 09:00:26 UTC (rev 42081)
@@ -15,6 +15,7 @@
        STATE_INITIALIZED       = -4
 };
 
+#include <stdio.h>
 
 /*!    Called when the thread performing the initialization function was 
canceled.
 

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/Jamfile
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/Jamfile
   2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/Jamfile
   2011-06-10 09:00:26 UTC (rev 42081)
@@ -1,7 +1,7 @@
 SubDir HAIKU_TOP src system libroot posix signal ;
 
 UsePrivateSystemHeaders ;
-UsePrivateHeaders shared ;
+UsePrivateHeaders libroot shared ;
 
 MergeObject posix_signal.o :
        kill.c

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/set_signal_mask.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/set_signal_mask.cpp
       2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/set_signal_mask.cpp
       2011-06-10 09:00:26 UTC (rev 42081)
@@ -15,7 +15,7 @@
 #include <symbol_versioning.h>
 #include <syscalls.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigaction.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigaction.cpp
     2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigaction.cpp
     2011-06-10 09:00:26 UTC (rev 42081)
@@ -17,7 +17,7 @@
 #include <symbol_versioning.h>
 #include <syscalls.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sighold.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sighold.cpp
       2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sighold.cpp
       2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigignore.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigignore.cpp
     2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigignore.cpp
     2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/siginterrupt.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/siginterrupt.cpp
  2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/siginterrupt.cpp
  2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal.cpp
        2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/signal.cpp
        2011-06-10 09:00:26 UTC (rev 42081)
@@ -15,7 +15,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 static __sighandler_t

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpause.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpause.cpp
      2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpause.cpp
      2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpending.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpending.cpp
    2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigpending.cpp
    2011-06-10 09:00:26 UTC (rev 42081)
@@ -17,7 +17,7 @@
 #include <symbol_versioning.h>
 #include <syscalls.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigrelse.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigrelse.cpp
      2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigrelse.cpp
      2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset.cpp
        2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset.cpp
        2011-06-10 09:00:26 UTC (rev 42081)
@@ -8,7 +8,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 __sighandler_t

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset_accessors.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset_accessors.cpp
      2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigset_accessors.cpp
      2011-06-10 09:00:26 UTC (rev 42081)
@@ -17,7 +17,7 @@
 
 #include <symbol_versioning.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 // #pragma - backward compatibility implementations

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigsuspend.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigsuspend.cpp
    2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigsuspend.cpp
    2011-06-10 09:00:26 UTC (rev 42081)
@@ -18,7 +18,7 @@
 #include <symbol_versioning.h>
 #include <syscalls.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigwait.cpp
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigwait.cpp
       2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/signal/sigwait.cpp
       2011-06-10 09:00:26 UTC (rev 42081)
@@ -13,7 +13,7 @@
 
 #include <syscalls.h>
 
-#include "signal_private.h"
+#include <signal_private.h>
 
 
 int

Modified: 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/sys/select.c
===================================================================
--- 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/sys/select.c 
    2011-06-10 01:58:39 UTC (rev 42080)
+++ 
haiku/branches/developer/bonefish/signals/src/system/libroot/posix/sys/select.c 
    2011-06-10 09:00:26 UTC (rev 42081)
@@ -15,7 +15,7 @@
 #include <symbol_versioning.h>
 #include <syscalls.h>
 
-#include "../signal/signal_private.h"
+#include <signal_private.h>
 
 
 int __pselect_beos(int numBits, struct fd_set *readBits,


Other related posts:

  • » [haiku-commits] r42081 - in haiku/branches/developer/bonefish/signals: headers/private/libroot src/system/libroot/posix/pthread src/system/libroot/posix/signal src/system/libroot/posix/sys - ingo_weinhold