except: update some coments.

If KAZLIB_POSIX_THREADS isn't defined, we are still using thread support
- compiler and support library support for per-thread data, at least for
the stack of exception catchers.

Update and expand comments.
This commit is contained in:
Guy Harris 2022-01-11 21:05:35 -08:00
parent 34c7a0edfd
commit 08f5044894
1 changed files with 10 additions and 1 deletions

View File

@ -128,8 +128,17 @@ void except_deinit(void)
pthread_mutex_unlock(&init_mtx);
}
#else /* no thread support */
#else /* not using POSIX thread support */
/*
* We make the catcher stack per-thread, because we must.
*
* We don't make the unhandled-exception-catcher, the allocator, or the
* deallocator thread-specific, as we don't need to.
*
* We don't protext the init level with a mutex, as we only initialize
* it and de-initialize it once.
*/
static int init_counter;
static void unhandled_catcher(except_t *);
static void (*uh_catcher_ptr)(except_t *) = unhandled_catcher;