projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uatomic: style fix
[urcu.git]
/
urcu-defer-impl.h
diff --git
a/urcu-defer-impl.h
b/urcu-defer-impl.h
index f65e41086022f2613bdaf251611a378afb6e5a3d..a7d0b2f7c45aa0a1054d70aac989293b63c87466 100644
(file)
--- a/
urcu-defer-impl.h
+++ b/
urcu-defer-impl.h
@@
-49,6
+49,7
@@
#include <urcu/list.h>
#include <urcu/system.h>
#include <urcu/tls-compat.h>
#include <urcu/list.h>
#include <urcu/system.h>
#include <urcu/tls-compat.h>
+#include "urcu-die.h"
/*
* Number of entries in the per-thread defer queue. Must be power of 2.
/*
* Number of entries in the per-thread defer queue. Must be power of 2.
@@
-141,17
+142,12
@@
static void mutex_lock_defer(pthread_mutex_t *mutex)
#ifndef DISTRUST_SIGNALS_EXTREME
ret = pthread_mutex_lock(mutex);
#ifndef DISTRUST_SIGNALS_EXTREME
ret = pthread_mutex_lock(mutex);
- if (ret) {
- perror("Error in pthread mutex lock");
- exit(-1);
- }
+ if (ret)
+ urcu_die(ret);
#else /* #ifndef DISTRUST_SIGNALS_EXTREME */
while ((ret = pthread_mutex_trylock(mutex)) != 0) {
#else /* #ifndef DISTRUST_SIGNALS_EXTREME */
while ((ret = pthread_mutex_trylock(mutex)) != 0) {
- if (ret != EBUSY && ret != EINTR) {
- printf("ret = %d, errno = %d\n", ret, errno);
- perror("Error in pthread mutex lock");
- exit(-1);
- }
+ if (ret != EBUSY && ret != EINTR)
+ urcu_die(ret);
poll(NULL,0,10);
}
#endif /* #else #ifndef DISTRUST_SIGNALS_EXTREME */
poll(NULL,0,10);
}
#endif /* #else #ifndef DISTRUST_SIGNALS_EXTREME */
This page took
0.025214 seconds
and
4
git commands to generate.