| Index: fusl/src/exit/at_quick_exit.c
|
| diff --git a/fusl/src/exit/at_quick_exit.c b/fusl/src/exit/at_quick_exit.c
|
| index 34541badad445160b743c6fe77bee0117f04bf49..c5590dd498f2818c92291acda872d7e8bbaa90f5 100644
|
| --- a/fusl/src/exit/at_quick_exit.c
|
| +++ b/fusl/src/exit/at_quick_exit.c
|
| @@ -7,23 +7,22 @@ static void (*funcs[COUNT])(void);
|
| static int count;
|
| static volatile int lock[2];
|
|
|
| -void __funcs_on_quick_exit()
|
| -{
|
| - void (*func)(void);
|
| - LOCK(lock);
|
| - while (count > 0) {
|
| - func = funcs[--count];
|
| - UNLOCK(lock);
|
| - func();
|
| - LOCK(lock);
|
| - }
|
| +void __funcs_on_quick_exit() {
|
| + void (*func)(void);
|
| + LOCK(lock);
|
| + while (count > 0) {
|
| + func = funcs[--count];
|
| + UNLOCK(lock);
|
| + func();
|
| + LOCK(lock);
|
| + }
|
| }
|
|
|
| -int at_quick_exit(void (*func)(void))
|
| -{
|
| - if (count == 32) return -1;
|
| - LOCK(lock);
|
| - funcs[count++] = func;
|
| - UNLOCK(lock);
|
| - return 0;
|
| +int at_quick_exit(void (*func)(void)) {
|
| + if (count == 32)
|
| + return -1;
|
| + LOCK(lock);
|
| + funcs[count++] = func;
|
| + UNLOCK(lock);
|
| + return 0;
|
| }
|
|
|