From c405a5bb3a2299c34f11431be477a228715e66fa Mon Sep 17 00:00:00 2001 From: Masoud Hemmatpour Date: Fri, 8 Mar 2019 13:40:22 +0100 Subject: [HICN-90] adding hicn-light to sysrepo-plugins Change-Id: Icd92adb21661d33b0cd40ea8c3dd748f0fa97aaf Signed-off-by: Masoud Hemmatpour Signed-off-by: Luca Muscariello Signed-off-by: Masoud Hemmatpour --- utils/sysrepo-plugin/plugin/model/tlock.c | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 utils/sysrepo-plugin/plugin/model/tlock.c (limited to 'utils/sysrepo-plugin/plugin/model/tlock.c') 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]++; -} -- cgit 1.2.3-korg