summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-07-20 21:47:42 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-07-20 21:50:32 +0200
commitcb1991af8c3f09e28c90932cb36bd1d2c07375d6 (patch)
tree8afceae737eed0619bdd3c074676795efccbdb2a /zebra
parentMerge pull request #11651 from anlancs/fix/minor-7 (diff)
downloadfrr-cb1991af8c3f09e28c90932cb36bd1d2c07375d6.tar.xz
frr-cb1991af8c3f09e28c90932cb36bd1d2c07375d6.zip
*: frr_with_mutex change to follow our standard
convert: frr_with_mutex(..) to: frr_with_mutex (..) To make all our code agree with what clang-format is going to produce Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_opaque.c4
-rw-r--r--zebra/zebra_rib.c4
-rw-r--r--zebra/zserv.c22
3 files changed, 15 insertions, 15 deletions
diff --git a/zebra/zebra_opaque.c b/zebra/zebra_opaque.c
index 3d757566e..d18c5fd5e 100644
--- a/zebra/zebra_opaque.c
+++ b/zebra/zebra_opaque.c
@@ -247,7 +247,7 @@ uint32_t zebra_opaque_enqueue_batch(struct stream_fifo *batch)
/* Dequeue messages from the incoming batch, and save them
* on the module fifo.
*/
- frr_with_mutex(&zo_info.mutex) {
+ frr_with_mutex (&zo_info.mutex) {
msg = stream_fifo_pop(batch);
while (msg) {
stream_fifo_push(&zo_info.in_fifo, msg);
@@ -288,7 +288,7 @@ static void process_messages(struct thread *event)
* Dequeue some messages from the incoming queue, temporarily
* save them on the local fifo
*/
- frr_with_mutex(&zo_info.mutex) {
+ frr_with_mutex (&zo_info.mutex) {
for (i = 0; i < zo_info.msgs_per_cycle; i++) {
msg = stream_fifo_pop(&zo_info.in_fifo);
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index d92a4c236..d0babbb9e 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -4242,7 +4242,7 @@ static void rib_process_dplane_results(struct thread *thread)
TAILQ_INIT(&ctxlist);
/* Take lock controlling queue of results */
- frr_with_mutex(&dplane_mutex) {
+ frr_with_mutex (&dplane_mutex) {
/* Dequeue list of context structs */
dplane_ctx_list_append(&ctxlist, &rib_dplane_q);
}
@@ -4401,7 +4401,7 @@ static void rib_process_dplane_results(struct thread *thread)
static int rib_dplane_results(struct dplane_ctx_q *ctxlist)
{
/* Take lock controlling queue of results */
- frr_with_mutex(&dplane_mutex) {
+ frr_with_mutex (&dplane_mutex) {
/* Enqueue context blocks */
dplane_ctx_list_append(&rib_dplane_q, ctxlist);
}
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 403f6c0d9..f76b29def 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -239,7 +239,7 @@ static void zserv_write(struct thread *thread)
cache = stream_fifo_new();
- frr_with_mutex(&client->obuf_mtx) {
+ frr_with_mutex (&client->obuf_mtx) {
while (stream_fifo_head(client->obuf_fifo))
stream_fifo_push(cache,
stream_fifo_pop(client->obuf_fifo));
@@ -432,7 +432,7 @@ static void zserv_read(struct thread *thread)
memory_order_relaxed);
/* publish read packets on client's input queue */
- frr_with_mutex(&client->ibuf_mtx) {
+ frr_with_mutex (&client->ibuf_mtx) {
while (cache->head)
stream_fifo_push(client->ibuf_fifo,
stream_fifo_pop(cache));
@@ -501,7 +501,7 @@ static void zserv_process_messages(struct thread *thread)
uint32_t p2p = zrouter.packets_to_process;
bool need_resched = false;
- frr_with_mutex(&client->ibuf_mtx) {
+ frr_with_mutex (&client->ibuf_mtx) {
uint32_t i;
for (i = 0; i < p2p && stream_fifo_head(client->ibuf_fifo);
++i) {
@@ -531,7 +531,7 @@ static void zserv_process_messages(struct thread *thread)
int zserv_send_message(struct zserv *client, struct stream *msg)
{
- frr_with_mutex(&client->obuf_mtx) {
+ frr_with_mutex (&client->obuf_mtx) {
stream_fifo_push(client->obuf_fifo, msg);
}
@@ -547,7 +547,7 @@ int zserv_send_batch(struct zserv *client, struct stream_fifo *fifo)
{
struct stream *msg;
- frr_with_mutex(&client->obuf_mtx) {
+ frr_with_mutex (&client->obuf_mtx) {
msg = stream_fifo_pop(fifo);
while (msg) {
stream_fifo_push(client->obuf_fifo, msg);
@@ -684,7 +684,7 @@ void zserv_close_client(struct zserv *client)
* Final check in case the client struct is in use in another
* pthread: if not in-use, continue and free the client
*/
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
if (client->busy_count <= 0) {
/* remove from client list */
listnode_delete(zrouter.client_list, client);
@@ -761,7 +761,7 @@ static struct zserv *zserv_client_create(int sock)
}
/* Add this client to linked list. */
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
listnode_add(zrouter.client_list, client);
}
@@ -797,7 +797,7 @@ struct zserv *zserv_acquire_client(uint8_t proto, unsigned short instance,
{
struct zserv *client = NULL;
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
client = find_client_internal(proto, instance, session_id);
if (client) {
/* Don't return a dead/closed client object */
@@ -823,7 +823,7 @@ void zserv_release_client(struct zserv *client)
* for it to be deleted as soon as we release the lock, so we won't
* touch the object again.
*/
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
client->busy_count--;
if (client->busy_count <= 0) {
@@ -1229,7 +1229,7 @@ struct zserv *zserv_find_client(uint8_t proto, unsigned short instance)
{
struct zserv *client;
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
client = find_client_internal(proto, instance, 0);
}
@@ -1244,7 +1244,7 @@ struct zserv *zserv_find_client_session(uint8_t proto, unsigned short instance,
{
struct zserv *client;
- frr_with_mutex(&client_mutex) {
+ frr_with_mutex (&client_mutex) {
client = find_client_internal(proto, instance, session_id);
}