From 98c8caa28a02354c86ea5788c6d7a09e38147f79 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期三, 29 七月 2020 17:56:49 +0800 Subject: [PATCH] add alloc key --- softbus.go | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/softbus.go b/softbus.go index 6071e89..520176f 100644 --- a/softbus.go +++ b/softbus.go @@ -54,6 +54,15 @@ return nil } +// ShmAllocKey alloc key +func ShmAllocKey() int { + if libsoftbus == nil { + return -1 + } + r := C.wrap_fn_shm_alloc_key(libsoftbus) + return int(r) +} + // ShmDestroy destroy shm block, every softbus proc MUST call it func ShmDestroy() { if libsoftbus != nil { -- Gitblit v1.8.0