Exemplo n.º 1
0
static void once_init(void)
{
	if ((unsigned long) acl_pthread_self() == acl_main_thread_self()) {
		acl_pthread_key_create(&once_key, dummy);
		atexit(main_free_tls);
	} else
		acl_pthread_key_create(&once_key, free_tls);
}
Exemplo n.º 2
0
static void slice_key_init(void)
{
	unsigned long curr_tid = (unsigned long) acl_pthread_self();
	unsigned long main_tid = (unsigned long) acl_main_thread_self();

	if (curr_tid == main_tid) {
		acl_pthread_key_create(&__mem_slice_key, NULL);
		atexit(main_thread_slice_free);
	} else
		acl_pthread_key_create(&__mem_slice_key, (void (*)(void*)) mem_slice_free);
}
Exemplo n.º 3
0
static void cache_init(void)
{
	acl_pthread_key_create(&cache_key, (void (*)(void*)) thread_cache_free);
}
Exemplo n.º 4
0
static void thread_init(void)
{
	acl_assert(acl_pthread_key_create(&__fiber_key, thread_free) == 0);
}
Exemplo n.º 5
0
static void thread_buf_init(void)
{
	acl_pthread_key_create(&__errbuf_key, thread_free_buf);
}
Exemplo n.º 6
0
static void thread_epoll_once(void)
{
    acl_assert(acl_pthread_key_create(&epoll_key, thread_epoll_end) == 0);
}
Exemplo n.º 7
0
static void thread_once(void)
{
	if (acl_pthread_key_create(&__thread_key, thread_free_dummy) != 0)
		abort();
}
Exemplo n.º 8
0
static void thread_init_once()
{
	acl_pthread_key_create(&stream_key, close_stream);
}