aboutsummaryrefslogtreecommitdiffstats
path: root/utils/sysrepo-plugin/plugin/model/tlock.c
diff options
context:
space:
mode:
authorLuca Muscariello <lumuscar+fdio@cisco.com>2019-03-29 15:45:34 +0000
committerGerrit Code Review <gerrit@fd.io>2019-03-29 15:45:34 +0000
commitfe16eee83b82383974996cffc0f423aa9deb50d9 (patch)
treeb84ef8e4d2c4259ec0d4b1748f56755a3920076c /utils/sysrepo-plugin/plugin/model/tlock.c
parent65317f78ac16a40d0ce189ec90eca45cbd064006 (diff)
parentc405a5bb3a2299c34f11431be477a228715e66fa (diff)
Merge "[HICN-90] adding hicn-light to sysrepo-plugins"
Diffstat (limited to 'utils/sysrepo-plugin/plugin/model/tlock.c')
-rw-r--r--utils/sysrepo-plugin/plugin/model/tlock.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/utils/sysrepo-plugin/plugin/model/tlock.c b/utils/sysrepo-plugin/plugin/model/tlock.c
deleted file mode 100644
index d870adf75..000000000
--- a/utils/sysrepo-plugin/plugin/model/tlock.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include"tlock.h"
-
-
-void Ticket_init ( int Lock_Number , long int init ){
-
-//__atomic_store( &En[Lock_Number] , &init , __ATOMIC_SEQ_CST );
-//__atomic_store( &De[Lock_Number] , &init , __ATOMIC_SEQ_CST );
-En[Lock_Number]=init;
-De[Lock_Number]=init;
-}
-
-void Ticket_Lock(int Lock_Number ){
-
- int my_ticket = __sync_fetch_and_add(&En[Lock_Number] , 1 );
- while ( my_ticket != De[ Lock_Number ] ) {};
-
-}
-
-void Ticket_Unlock(int Lock_Number ){
-De[Lock_Number]++;
-}