libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
thread.c
1/*
2 * CDDL HEADER START
3 *
4 * This file and its contents are supplied under the terms of the
5 * Common Development and Distribution License ("CDDL"), version 1.0.
6 * You may only use this file in accordance with the terms of version
7 * 1.0 of the CDDL.
8 *
9 * A full copy of the text of the CDDL should have accompanied this
10 * source. A copy of the CDDL is also available via the Internet at
11 * http://www.illumos.org/license/CDDL.
12 *
13 * CDDL HEADER END
14*/
15/*
16 * Copyright 2021 Saso Kiselkov. All rights reserved.
17 */
18
19#include "acfutils/thread.h"
20
21bool_t lacf_thread_list_inited = B_FALSE;
22mutex_t lacf_thread_list_lock;
23list_t lacf_thread_list;
24
25#if IBM
26
27DWORD
29{
31 ti->proc(ti->arg);
33 free(ti);
34 return (0);
35}
36
37#else
38
39void *
41{
43 ti->proc(ti->arg);
45 free(ti);
46 return (NULL);
47}
48
49#endif
DWORD lacf_thread_start_routine(void *arg)
Definition thread.c:40
static void _lacf_thread_list_remove(lacf_thread_info_t *ti)
Definition thread.h:624