2 Copyright (c) 2002, Thomas Kurschel
21 #define INIT_BEN(x, prefix) ( (x).ben = 0, (x).sem = create_sem(0, #prefix " benaphore"), (x).sem )
22 #define ACQUIRE_BEN(x) if((atomic_add(&(x.ben), 1)) >= 1) acquire_sem(x.sem);
23 #define RELEASE_BEN(x) if((atomic_add(&(x.ben), -1)) > 1) release_sem(x.sem);
24 #define DELETE_BEN(x) delete_sem(x.sem);