projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: bump tests thread limit to 4096
[urcu.git]
/
src
/
rculfhash.c
diff --git
a/src/rculfhash.c
b/src/rculfhash.c
index ff42df0aef30ecf567da51014cdd0a7c6235c96f..247564b8aa72f3d6ac7c87b1f1f12ab98ef5dc98 100644
(file)
--- a/
src/rculfhash.c
+++ b/
src/rculfhash.c
@@
-273,6
+273,7
@@
#include <urcu/uatomic.h>
#include <urcu/compiler.h>
#include <urcu/rculfhash.h>
#include <urcu/uatomic.h>
#include <urcu/compiler.h>
#include <urcu/rculfhash.h>
+#include <urcu/static/urcu-signal-nr.h>
#include <rculfhash-internal.h>
#include <stdio.h>
#include <pthread.h>
#include <rculfhash-internal.h>
#include <stdio.h>
#include <pthread.h>
@@
-466,7
+467,7
@@
unsigned long bit_reverse_ulong(unsigned long v)
* Returns 0 if no bit is set, else returns the position of the most
* significant bit (from 1 to 32 on 32-bit, from 1 to 64 on 64-bit).
*/
* Returns 0 if no bit is set, else returns the position of the most
* significant bit (from 1 to 32 on 32-bit, from 1 to 64 on 64-bit).
*/
-#if defined(
__i386) || defined(__x86_64
)
+#if defined(
URCU_ARCH_X86
)
static inline
unsigned int fls_u32(uint32_t x)
{
static inline
unsigned int fls_u32(uint32_t x)
{
@@
-482,7
+483,7
@@
unsigned int fls_u32(uint32_t x)
#define HAS_FLS_U32
#endif
#define HAS_FLS_U32
#endif
-#if defined(
__x86_
64)
+#if defined(
URCU_ARCH_AMD
64)
static inline
unsigned int fls_u64(uint64_t x)
{
static inline
unsigned int fls_u64(uint64_t x)
{
@@
-825,7
+826,7
@@
struct cds_lfht_node *clear_flag(struct cds_lfht_node *node)
}
static
}
static
-int is_removed(struct cds_lfht_node *node)
+int is_removed(
const
struct cds_lfht_node *node)
{
return ((unsigned long) node) & REMOVED_FLAG;
}
{
return ((unsigned long) node) & REMOVED_FLAG;
}
@@
-1829,7
+1830,7
@@
int cds_lfht_del(struct cds_lfht *ht, struct cds_lfht_node *node)
return ret;
}
return ret;
}
-int cds_lfht_is_node_deleted(struct cds_lfht_node *node)
+int cds_lfht_is_node_deleted(
const
struct cds_lfht_node *node)
{
return is_removed(CMM_LOAD_SHARED(node->next));
}
{
return is_removed(CMM_LOAD_SHARED(node->next));
}
@@
-2151,18
+2152,24
@@
static struct urcu_atfork cds_lfht_atfork = {
.after_fork_child = cds_lfht_after_fork_child,
};
.after_fork_child = cds_lfht_after_fork_child,
};
-/* Block all signals to ensure we don't disturb the application. */
+/*
+ * Block all signals for the workqueue worker thread to ensure we don't
+ * disturb the application. The SIGRCU signal needs to be unblocked for
+ * the urcu-signal flavor.
+ */
static void cds_lfht_worker_init(struct urcu_workqueue *workqueue,
void *priv)
{
int ret;
sigset_t mask;
static void cds_lfht_worker_init(struct urcu_workqueue *workqueue,
void *priv)
{
int ret;
sigset_t mask;
- /* Block signal for entire process, so only our thread processes it. */
ret = sigfillset(&mask);
if (ret)
urcu_die(errno);
ret = sigfillset(&mask);
if (ret)
urcu_die(errno);
- ret = pthread_sigmask(SIG_BLOCK, &mask, NULL);
+ ret = sigdelset(&mask, SIGRCU);
+ if (ret)
+ urcu_die(errno);
+ ret = pthread_sigmask(SIG_SETMASK, &mask, NULL);
if (ret)
urcu_die(ret);
}
if (ret)
urcu_die(ret);
}
This page took
0.025326 seconds
and
4
git commands to generate.