CLEANUP: threads: rename process_mask to thread_mask
It was a leftover from the last cleaning session; this mask applies
to threads and calling it process_mask is a bit confusing. It's the
same in fd, task and applets.
diff --git a/include/proto/applet.h b/include/proto/applet.h
index 766fc92..a6f2633 100644
--- a/include/proto/applet.h
+++ b/include/proto/applet.h
@@ -50,7 +50,7 @@
{
appctx->st0 = appctx->st1 = appctx->st2 = 0;
appctx->io_release = NULL;
- appctx->process_mask = thread_mask;
+ appctx->thread_mask = thread_mask;
appctx->state = APPLET_SLEEPING;
}
diff --git a/include/proto/fd.h b/include/proto/fd.h
index 72af70f..e240f5c 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -404,7 +404,7 @@
fdtab[fd].linger_risk = 0;
fdtab[fd].cloned = 0;
fdtab[fd].cache = 0;
- fdtab[fd].process_mask = thread_mask;
+ fdtab[fd].thread_mask = thread_mask;
SPIN_UNLOCK(FD_LOCK, &fdtab[fd].lock);
SPIN_LOCK(FDTAB_LOCK, &fdtab_lock);
diff --git a/include/proto/task.h b/include/proto/task.h
index cb98fef..6a89cd9 100644
--- a/include/proto/task.h
+++ b/include/proto/task.h
@@ -127,11 +127,12 @@
return t;
}
+/* change the thread affinity of a task to <thread_mask> */
static inline void task_set_affinity(struct task *t, unsigned long thread_mask)
{
-
- t->process_mask = thread_mask;
+ t->thread_mask = thread_mask;
}
+
/*
* Unlink the task from the wait queue, and possibly update the last_timer
* pointer. A pointer to the task itself is returned. The task *must* already
@@ -202,7 +203,7 @@
t->wq.node.leaf_p = NULL;
t->rq.node.leaf_p = NULL;
t->pending_state = t->state = TASK_SLEEPING;
- t->process_mask = thread_mask;
+ t->thread_mask = thread_mask;
t->nice = 0;
t->calls = 0;
t->expire = TICK_ETERNITY;
diff --git a/include/types/applet.h b/include/types/applet.h
index b56c563..1c469a5 100644
--- a/include/types/applet.h
+++ b/include/types/applet.h
@@ -67,7 +67,7 @@
if the command is terminated or the session released */
int cli_severity_output; /* used within the cli_io_handler to format severity output of informational feedback */
struct buffer_wait buffer_wait; /* position in the list of objects waiting for a buffer */
- unsigned long process_mask; /* mask of thread IDs authorized to process the applet */
+ unsigned long thread_mask; /* mask of thread IDs authorized to process the applet */
union {
struct {
diff --git a/include/types/fd.h b/include/types/fd.h
index e196aec..2da6599 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -94,7 +94,7 @@
struct fdtab {
void (*iocb)(int fd); /* I/O handler */
void *owner; /* the connection or listener associated with this fd, NULL if closed */
- unsigned long process_mask; /* mask of thread IDs authorized to process the task */
+ unsigned long thread_mask; /* mask of thread IDs authorized to process the task */
#ifdef USE_THREAD
HA_SPINLOCK_T lock;
#endif
diff --git a/include/types/task.h b/include/types/task.h
index 799e6c5..236324d 100644
--- a/include/types/task.h
+++ b/include/types/task.h
@@ -72,7 +72,7 @@
void *context; /* the task's context */
struct eb32_node wq; /* ebtree node used to hold the task in the wait queue */
int expire; /* next expiration date for this task, in ticks */
- unsigned long process_mask; /* mask of thread IDs authorized to process the task */
+ unsigned long thread_mask; /* mask of thread IDs authorized to process the task */
};
/*