]> mj.ucw.cz Git - libucw.git/commitdiff
The rest of sighandler separation
authorMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 22:29:10 +0000 (23:29 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 22:29:10 +0000 (23:29 +0100)
TODO
ucw/Makefile
ucw/lib.h
ucw/lizard-safe.c
ucw/sighandler.c
ucw/threads.h

diff --git a/TODO b/TODO
index db6dcf5e48cd98365afcc294e7d01498fb61dd4a..c35695c79c35ed7e1314944141059071263091e3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,2 +1,3 @@
 - Clean up free/
 - gary: Add automatic zeroing
+- Remove sighandler.[ch]
index 77c5a08fd1f76193ead5722221686cbf75331951..b8ac841b2fc25f5fcbbb6a7d9de0f21155be4cff 100644 (file)
@@ -23,8 +23,8 @@ LIBUCW_MODS= \
        bit-ffs bit-fls \
        url \
        mainloop main-block main-rec \
-       proctitle exitstatus runcmd sighandler \
-       lizard lizard-safe adler32 \
+       proctitle exitstatus runcmd \
+       lizard lizard-safe adler32 sighandler \
        md5 sha1 sha1-hmac \
        base64 base224 \
        io-careful io-sync io-mmap io-size \
@@ -52,7 +52,7 @@ LIBUCW_MAIN_INCLUDES= \
        url.h \
        mainloop.h \
        process.h \
-       lizard.h \
+       lizard.h sighandler.h \
        md5.h sha1.h \
        base64.h base224.h \
        qache.h \
index 29c2d236c9346f3088aea0dae05a11cb9fb7b23f..7af2946887aaa0d1ef78864872ac927b0964a762 100644 (file)
--- a/ucw/lib.h
+++ b/ucw/lib.h
@@ -181,14 +181,6 @@ uns random_max(uns max);                   /** Return a pseudorandom 32-bit number in range [0,@
 u64 random_u64(void);                          /** Return a pseudorandom 64-bit number. **/
 u64 random_max_u64(u64 max);                   /** Return a pseudorandom 64-bit number in range [0,@max). **/
 
-/* sighandler.c */
-
-typedef int (*ucw_sighandler_t)(int);  // gets signum, returns nonzero if abort() should be called
-
-void handle_signal(int signum);
-void unhandle_signal(int signum);
-ucw_sighandler_t set_signal_handler(int signum, ucw_sighandler_t newh);
-
 /* bigalloc.c */
 
 void *page_alloc(u64 len) LIKE_MALLOC; // allocates a multiple of CPU_PAGE_SIZE bytes with mmap
index ba7d8df34cdb05a9602735e2ea0aea266b3a8be1..06302619587c9bf3c2910747ec9011a3dda645ba 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "ucw/lib.h"
 #include "ucw/threads.h"
+#include "ucw/sighandler.h"
 #include "ucw/lizard.h"
 
 #include <sys/mman.h>
index 9cc5f2aed26579b56ecb311884073827ba50260d..8f117e765c5a0f8dfad3220ee16b4c3ae484353b 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "ucw/lib.h"
 #include "ucw/threads.h"
+#include "ucw/sighandler.h"
 
 #include <stdlib.h>
 #include <string.h>
index 9334e29e317434a2cde4f1d3e2b3c5f77ddb2383..a0d3f59f9b150aba6a8454db6db43b8c0f6c864f 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _UCW_THREADS_H
 #define _UCW_THREADS_H
 
+#include "ucw/sighandler.h"
+
 /* This structure holds per-thread data */
 
 struct ucwlib_context {