From: Hyongtaek Lim Date: Tue, 28 Jul 2015 04:47:14 +0000 (+0900) Subject: Add the mmsvc_core_get_atomic_uint function X-Git-Tag: submit/tizen/20150728.084621^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=692abb31320f379283be22077b926a869d39c53a;p=platform%2Fcore%2Fmultimedia%2Fmmsvc-core.git Add the mmsvc_core_get_atomic_uint function Signed-off-by: Hyongtaek Lim Change-Id: I06a82ce3fa8d23896b5c4231a8fd5a017bdec620 --- diff --git a/include/mmsvc_core.h b/include/mmsvc_core.h index fbdd71a..75fd5b0 100644 --- a/include/mmsvc_core.h +++ b/include/mmsvc_core.h @@ -42,6 +42,7 @@ void *mmsvc_core_client_get_cust_data(Client client); char *mmsvc_core_client_get_msg(Client client); int mmsvc_core_client_get_capi(Client client); void mmsvc_core_worker_exit(Client client); +unsigned mmsvc_core_get_atomic_uint(void); #ifdef __cplusplus } diff --git a/src/mmsvc_core.c b/src/mmsvc_core.c index 18efecf..98ebbb1 100644 --- a/src/mmsvc_core.c +++ b/src/mmsvc_core.c @@ -499,3 +499,12 @@ void mmsvc_core_worker_exit(Client client) LOGD("Leave"); g_thread_exit(NULL); } + +unsigned mmsvc_core_get_atomic_uint() +{ + static guint atom = 0; + + g_atomic_int_inc(&atom); + + return atom; +}