X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_stack%2Frte_stack.c;h=2cc7e8e1695eb5e96aa6af17d3d838993404b65c;hb=0c4d3e4268576ce31c11e6d09d819b43592c1323;hp=60f63a65b92d199217955f3fa9877f1024d70bb4;hpb=6723c0fc7207ca4416822b170b1485a78aa47c7c;p=dpdk.git diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c index 60f63a65b9..2cc7e8e169 100644 --- a/lib/librte_stack/rte_stack.c +++ b/lib/librte_stack/rte_stack.c @@ -84,13 +84,13 @@ rte_stack_create(const char *name, unsigned int count, int socket_id, return NULL; } - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_lock(); mz = rte_memzone_reserve_aligned(mz_name, sz, socket_id, 0, __alignof__(*s)); if (mz == NULL) { STACK_LOG_ERR("Cannot reserve stack memzone!\n"); - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); rte_free(te); return NULL; } @@ -102,7 +102,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id, /* Store the name for later lookups */ ret = strlcpy(s->name, name, sizeof(s->name)); if (ret < 0 || ret >= (int)sizeof(s->name)) { - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); rte_errno = ENAMETOOLONG; rte_free(te); @@ -120,7 +120,7 @@ rte_stack_create(const char *name, unsigned int count, int socket_id, TAILQ_INSERT_TAIL(stack_list, te, next); - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); return s; } @@ -135,7 +135,7 @@ rte_stack_free(struct rte_stack *s) return; stack_list = RTE_TAILQ_CAST(rte_stack_tailq.head, rte_stack_list); - rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_lock(); /* find out tailq entry */ TAILQ_FOREACH(te, stack_list, next) { @@ -144,13 +144,13 @@ rte_stack_free(struct rte_stack *s) } if (te == NULL) { - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); return; } TAILQ_REMOVE(stack_list, te, next); - rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_write_unlock(); rte_free(te); @@ -171,7 +171,7 @@ rte_stack_lookup(const char *name) stack_list = RTE_TAILQ_CAST(rte_stack_tailq.head, rte_stack_list); - rte_rwlock_read_lock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_read_lock(); TAILQ_FOREACH(te, stack_list, next) { r = (struct rte_stack *) te->data; @@ -179,7 +179,7 @@ rte_stack_lookup(const char *name) break; } - rte_rwlock_read_unlock(RTE_EAL_TAILQ_RWLOCK); + rte_mcfg_tailq_read_unlock(); if (te == NULL) { rte_errno = ENOENT;