poldek: poldek/sigint/sigint.c, poldek/sigint/sigint.h, poldek/libpoldek.sy...
mis
mis at pld-linux.org
Thu May 8 20:34:53 CEST 2008
Author: mis Date: Thu May 8 18:34:53 2008 GMT
Module: poldek Tag: HEAD
---- Log message:
- sigint_emit() (megabajt at pld-linux.org)
---- Files affected:
poldek/poldek/sigint:
sigint.c (1.4 -> 1.5) , sigint.h (1.5 -> 1.6)
poldek/poldek:
libpoldek.sym (1.33 -> 1.34)
---- Diffs:
================================================================
Index: poldek/poldek/sigint/sigint.c
diff -u poldek/poldek/sigint/sigint.c:1.4 poldek/poldek/sigint/sigint.c:1.5
--- poldek/poldek/sigint/sigint.c:1.4 Sat Feb 2 22:49:05 2008
+++ poldek/poldek/sigint/sigint.c Thu May 8 20:34:48 2008
@@ -48,6 +48,20 @@
orig_sighandler(sig);
}
+void sigint_emit(void)
+{
+ int i;
+
+ if (enabled == 0)
+ return;
+
+ interrupted = 1;
+
+ for (i = 0; i < n_array_size(cb_stack); i++) {
+ void (*cb)(void) = n_array_nth(cb_stack, i);
+ cb();
+ }
+}
void sigint_enable(int v)
{
================================================================
Index: poldek/poldek/sigint/sigint.h
diff -u poldek/poldek/sigint/sigint.h:1.5 poldek/poldek/sigint/sigint.h:1.6
--- poldek/poldek/sigint/sigint.h:1.5 Sun May 15 18:10:39 2005
+++ poldek/poldek/sigint/sigint.h Thu May 8 20:34:48 2008
@@ -6,7 +6,12 @@
void sigint_destroy(void);
void sigint_reset(void);
-void sigint_reset(void);
+/*
+ * emit sigint. Can be used in some external applications
+ * using libpoldek to interrupt given action (eg. searching,
+ * processing dependencies and others)
+ */
+void sigint_emit(void);
void sigint_push(void (*cb)(void));
void *sigint_pop(void);
================================================================
Index: poldek/poldek/libpoldek.sym
diff -u poldek/poldek/libpoldek.sym:1.33 poldek/poldek/libpoldek.sym:1.34
--- poldek/poldek/libpoldek.sym:1.33 Sat Feb 2 16:27:24 2008
+++ poldek/poldek/libpoldek.sym Thu May 8 20:34:48 2008
@@ -258,6 +258,7 @@
poldeklib_init
rpmlog
sigint_destroy
+sigint_emit
sigint_init
sigint_pop
sigint_push
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/sigint/sigint.c?r1=1.4&r2=1.5&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/sigint/sigint.h?r1=1.5&r2=1.6&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/libpoldek.sym?r1=1.33&r2=1.34&f=u
More information about the pld-cvs-commit
mailing list