aboutsummaryrefslogtreecommitdiffstats
path: root/src/nSocket/include/select_adapt.h
diff options
context:
space:
mode:
authornanger <zhenyinan@huawei.com>2018-09-29 16:41:15 +0800
committernanger <zhenyinan@huawei.com>2018-09-29 16:45:14 +0800
commit74c9aed15303d388d7d0429128bc3af96f7eb45c (patch)
treeb4659364e410ef5b0f36b61bbf98c48e5763d8e5 /src/nSocket/include/select_adapt.h
parent31ea86798426cf236d70c9de1944c723a6cb1d95 (diff)
Refactor: change to dmm share memory
Change-Id: Iff87eb5c6610c1db9247a898dd4c8ffbe6eeabdf Signed-off-by: nanger <zhenyinan@huawei.com>
Diffstat (limited to 'src/nSocket/include/select_adapt.h')
-rw-r--r--src/nSocket/include/select_adapt.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nSocket/include/select_adapt.h b/src/nSocket/include/select_adapt.h
index 2898c76..072f53b 100644
--- a/src/nSocket/include/select_adapt.h
+++ b/src/nSocket/include/select_adapt.h
@@ -35,9 +35,8 @@
#include "types.h"
#include "nstack_module.h"
-#include "common_mem_spinlock.h"
#include "nstack_securec.h"
-#include "common_func.h"
+#include "dmm_spinlock.h"
#define SBR_MAX_FD_NUM MAX_SOCKET_NUM
@@ -54,11 +53,11 @@
}
typedef sem_t select_sem_t;
-typedef common_mem_spinlock_t select_spinlock_t;
+typedef dmm_spinlock_t select_spinlock_t;
-#define select_spin_lock(lock) (common_mem_spinlock_lock((lock)))
-#define select_spin_unlock(lock) (common_mem_spinlock_unlock((lock)))
-#define select_spin_lock_init(lock) (common_mem_spinlock_init((lock)))
+#define select_spin_lock(lock) (dmm_spin_lock((lock)))
+#define select_spin_unlock(lock) (dmm_spin_unlock((lock)))
+#define select_spin_lock_init(lock) (dmm_spin_init((lock)))
#define select_sem_wait(sem) (sem_wait((sem)))
#define select_sem_init(sem, share, val) (sem_init((sem), (share), (val)))