GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b4be8e
)
Cross test priprava
author
Tomas Mudrunka
<tomas@mudrunka.cz>
Thu, 1 Jul 2021 14:08:25 +0000
(16:08 +0200)
committer
Tomas Mudrunka
<tomas@mudrunka.cz>
Thu, 1 Jul 2021 14:08:25 +0000
(16:08 +0200)
c/pthread_pause.c
patch
|
blob
|
blame
|
history
diff --git
a/c/pthread_pause.c
b/c/pthread_pause.c
index 7d6ed6af01a57daef4c91d417ef3eb08df15dc04..90282a201f2ec96295c1f2e5461128a31bf6e055 100644
(file)
--- a/
c/pthread_pause.c
+++ b/
c/pthread_pause.c
@@
-20,6
+20,8
@@
#define PTHREAD_XSIG_CONT (SIGRTMIN+1)
#define PTHREAD_XSIGRTMIN (SIGRTMIN+2) //First unused RT signal
#define PTHREAD_XSIG_CONT (SIGRTMIN+1)
#define PTHREAD_XSIGRTMIN (SIGRTMIN+2) //First unused RT signal
+pthread_t main_thread;
+
void pthread_pause_handler(int signal) {
//Do nothing when there are more signals pending (to cleanup the queue)
sigset_t pending;
void pthread_pause_handler(int signal) {
//Do nothing when there are more signals pending (to cleanup the queue)
sigset_t pending;
@@
-94,11
+96,14
@@
void *thread_test() {
pthread_pause_disable();
printf("Running!\n");
pthread_pause_enable();
pthread_pause_disable();
printf("Running!\n");
pthread_pause_enable();
+ //pthread_pause(main_thread);
+ //pthread_unpause(main_thread);
}
}
int main() {
pthread_t t;
}
}
int main() {
pthread_t t;
+ main_thread = pthread_self();
pthread_pause_enable(); //Will get inherited by all threads from now on
//you need to call pthread_pause_enable (or disable) before creating threads,
//otherwise first signal will kill whole process
pthread_pause_enable(); //Will get inherited by all threads from now on
//you need to call pthread_pause_enable (or disable) before creating threads,
//otherwise first signal will kill whole process
This page took
0.144169 seconds
and
4
git commands to generate.