diff options
author | Luca Muscariello <muscariello@ieee.org> | 2022-08-11 18:30:53 +0200 |
---|---|---|
committer | Luca Muscariello <muscariello@ieee.org> | 2022-08-11 18:30:53 +0200 |
commit | 55343701359194493fbd9ff4950ac4f941bbdae3 (patch) | |
tree | 4583baaebd2a715d225054c845a36dc9f63c86ba /ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c | |
parent | b9ed4b7dd6c2342bc87209d415b840d65ea5ccf0 (diff) |
feat: drop sysrepo and netconf/yang support
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Change-Id: I215af1b77a3f9da878f3894708f687a7e7ea03a2
Diffstat (limited to 'ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c')
-rw-r--r-- | ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c b/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c deleted file mode 100644 index ba788d3a0..000000000 --- a/ctrl/sysrepo-plugins/hicn-light/plugin/model/tlock.c +++ /dev/null @@ -1,16 +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]++; } |