Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VCL: Fix socket_test.sh to build test apps.
[vpp.git]
/
src
/
vlib
/
threads.h
diff --git
a/src/vlib/threads.h
b/src/vlib/threads.h
index
7de0412
..
0e9cba5
100644
(file)
--- a/
src/vlib/threads.h
+++ b/
src/vlib/threads.h
@@
-108,7
+108,9
@@
typedef struct
volatile u32 *node_reforks_required;
long lwp;
volatile u32 *node_reforks_required;
long lwp;
- int lcore_id;
+ int cpu_id;
+ int core_id;
+ int socket_id;
pthread_t thread_id;
} vlib_worker_thread_t;
pthread_t thread_id;
} vlib_worker_thread_t;
@@
-270,8
+272,8
@@
typedef enum
typedef struct
{
clib_error_t *(*vlib_launch_thread_cb) (void *fp, vlib_worker_thread_t * w,
typedef struct
{
clib_error_t *(*vlib_launch_thread_cb) (void *fp, vlib_worker_thread_t * w,
- unsigned
lcore
_id);
- clib_error_t *(*vlib_thread_set_lcore_cb) (u32 thread, u16
lcore
);
+ unsigned
cpu
_id);
+ clib_error_t *(*vlib_thread_set_lcore_cb) (u32 thread, u16
cpu
);
} vlib_thread_callbacks_t;
typedef struct
} vlib_thread_callbacks_t;
typedef struct
@@
-412,7
+414,7
@@
vlib_worker_thread_barrier_check (void)
ed->thread_index = thread_index;
}
ed->thread_index = thread_index;
}
- clib_
smp_atomic
_add (vlib_worker_threads->workers_at_barrier, 1);
+ clib_
atomic_fetch
_add (vlib_worker_threads->workers_at_barrier, 1);
if (CLIB_DEBUG > 0)
{
vm = vlib_get_main ();
if (CLIB_DEBUG > 0)
{
vm = vlib_get_main ();
@@
-422,7
+424,7
@@
vlib_worker_thread_barrier_check (void)
;
if (CLIB_DEBUG > 0)
vm->parked_at_barrier = 0;
;
if (CLIB_DEBUG > 0)
vm->parked_at_barrier = 0;
- clib_
smp_atomic
_add (vlib_worker_threads->workers_at_barrier, -1);
+ clib_
atomic_fetch
_add (vlib_worker_threads->workers_at_barrier, -1);
if (PREDICT_FALSE (*vlib_worker_threads->node_reforks_required))
{
if (PREDICT_FALSE (*vlib_worker_threads->node_reforks_required))
{
@@
-448,8
+450,8
@@
vlib_worker_thread_barrier_check (void)
}
vlib_worker_thread_node_refork ();
}
vlib_worker_thread_node_refork ();
- clib_
smp_atomic
_add (vlib_worker_threads->node_reforks_required,
- -1);
+ clib_
atomic_fetch
_add (vlib_worker_threads->node_reforks_required,
+
-1);
while (*vlib_worker_threads->node_reforks_required)
;
}
while (*vlib_worker_threads->node_reforks_required)
;
}
@@
-517,7
+519,7
@@
vlib_get_frame_queue_elt (u32 frame_queue_index, u32 index)
fq = fqm->vlib_frame_queues[index];
ASSERT (fq);
fq = fqm->vlib_frame_queues[index];
ASSERT (fq);
- new_tail =
__sync_add_an
d_fetch (&fq->tail, 1);
+ new_tail =
clib_atomic_ad
d_fetch (&fq->tail, 1);
/* Wait until a ring slot is available */
while (new_tail >= fq->head_hint + fq->nelts)
/* Wait until a ring slot is available */
while (new_tail >= fq->head_hint + fq->nelts)
@@
-595,6
+597,7
@@
vlib_process_signal_event_mt_helper (vlib_process_signal_event_mt_args_t *
args);
void vlib_rpc_call_main_thread (void *function, u8 * args, u32 size);
args);
void vlib_rpc_call_main_thread (void *function, u8 * args, u32 size);
+u32 elog_global_id_for_msg_name (const char *msg_name);
#endif /* included_vlib_threads_h */
/*
#endif /* included_vlib_threads_h */
/*