[Tarantool-patches] [PATCH 41/43] build: export src/lib/core/latch.c symbols

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Apr 12 03:13:24 MSK 2020


Exports functions visible to the public C API.

Part of #2971
---
 extra/exports        |  5 -----
 src/exports.c        |  2 ++
 src/lib/core/latch.c | 13 +++++++++++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/extra/exports b/extra/exports
index 809e0e07f..5db526d2c 100644
--- a/extra/exports
+++ b/extra/exports
@@ -2,11 +2,6 @@
 
 # Module API
 
-box_latch_new
-box_latch_delete
-box_latch_lock
-box_latch_trylock
-box_latch_unlock
 string_strip_helper
 
 # Lua / LuaJIT
diff --git a/src/exports.c b/src/exports.c
index a62c89b14..de1892026 100644
--- a/src/exports.c
+++ b/src/exports.c
@@ -53,6 +53,7 @@ EXPORT(box_error_export_syms);
 EXPORT(box_export_syms);
 EXPORT(box_index_export_syms);
 EXPORT(box_key_def_export_syms);
+EXPORT(box_latch_export_syms);
 EXPORT(box_lua_export_syms);
 EXPORT(box_schema_export_syms);
 EXPORT(box_space_export_syms);
@@ -89,6 +90,7 @@ export_syms(void)
 		box_export_syms,
 		box_index_export_syms,
 		box_key_def_export_syms,
+		box_latch_export_syms,
 		box_lua_export_syms,
 		box_schema_export_syms,
 		box_space_export_syms,
diff --git a/src/lib/core/latch.c b/src/lib/core/latch.c
index cc7120ef4..9b94a0b05 100644
--- a/src/lib/core/latch.c
+++ b/src/lib/core/latch.c
@@ -70,3 +70,16 @@ box_latch_unlock(box_latch_t* bl)
 {
 	latch_unlock(&bl->l);
 }
+
+void **
+box_latch_export_syms(void)
+{
+	static void *syms[] = {
+		(void *)box_latch_delete,
+		(void *)box_latch_lock,
+		(void *)box_latch_new,
+		(void *)box_latch_trylock,
+		(void *)box_latch_unlock,
+	};
+	return syms;
+}
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list