1
/* ``The contents of this file are subject to the Erlang Public License,
2
* Version 1.1, (the "License"); you may not use this file except in
3
* compliance with the License. You should have received a copy of the
4
* Erlang Public License along with this software. If not, it can be
5
* retrieved via the world wide web at http://www.erlang.org/.
7
* Software distributed under the License is distributed on an "AS IS"
8
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
* the License for the specific language governing rights and limitations
12
* The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
* Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
* AB. All Rights Reserved.''
21
#include "erl_alloc.h"
22
#include "erl_driver.h"
23
#define ERL_THREADS_EMU_INTERNAL__
24
#include "erl_threads.h"
32
erts_mutex_t erts_mutex_create(void)
37
erts_mutex_t erts_mutex_sys(int mno)
42
int erts_atfork_sys(void (*prepare)(void),
49
int erts_mutex_set_default_atfork(erts_mutex_t mtx)
54
int erts_mutex_unset_default_atfork(erts_mutex_t mtx)
59
int erts_mutex_destroy(erts_mutex_t mtx)
64
int erts_mutex_lock(erts_mutex_t mtx)
69
int erts_mutex_unlock(erts_mutex_t mtx)
74
erts_cond_t erts_cond_create(void)
79
int erts_cond_destroy(erts_cond_t cv)
84
int erts_cond_signal(erts_cond_t cv)
89
int erts_cond_broadcast(erts_cond_t cv)
94
int erts_cond_wait(erts_cond_t cv, erts_mutex_t mtx)
99
int erts_cond_timedwait(erts_cond_t cp, erts_mutex_t mp, long time)
104
int erts_thread_create(erts_thread_t* tpp,
105
void* (*func)(void*),
112
erts_thread_t erts_thread_self()
117
void erts_thread_exit(void* val)
121
int erts_thread_join(erts_thread_t tp, void** vp)
126
int er_thread_kill(erts_thread_t tp)
132
erts_sys_threads_init(void)
134
/* NOTE: erts_sys_threads_init() is called before allocators are
135
* initialized; therefore, it's not allowed to call erts_alloc()
136
* (and friends) from here.