source: mainline/uspace/lib/c/include/fibril.h@ cd1e3fc0

Last change on this file since cd1e3fc0 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2006 Ondrej Palkovsky
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/** @addtogroup libc
8 * @{
9 */
10/** @file
11 */
12
13#ifndef _LIBC_FIBRIL_H_
14#define _LIBC_FIBRIL_H_
15
16#include <time.h>
17#include <_bits/errno.h>
18#include <_bits/__noreturn.h>
19#include <_bits/decls.h>
20
21__HELENOS_DECLS_BEGIN;
22
23typedef struct fibril fibril_t;
24
25typedef struct {
26 fibril_t *owned_by;
27} fibril_owner_info_t;
28
29typedef fibril_t *fid_t;
30
31#ifndef __cplusplus
32/** Fibril-local variable specifier */
33#define fibril_local __thread
34#endif
35
36extern fid_t fibril_create_generic(errno_t (*)(void *), void *, size_t);
37extern fid_t fibril_create(errno_t (*)(void *), void *);
38extern void fibril_destroy(fid_t);
39extern void fibril_add_ready(fid_t);
40extern fid_t fibril_get_id(void);
41extern void fibril_yield(void);
42
43extern void fibril_usleep(usec_t);
44extern void fibril_sleep(sec_t);
45
46extern void fibril_enable_multithreaded(void);
47extern int fibril_test_spawn_runners(int);
48
49extern void fibril_detach(fid_t fid);
50
51extern void fibril_start(fid_t);
52extern __noreturn void fibril_exit(long);
53
54__HELENOS_DECLS_END;
55
56#endif
57
58/** @}
59 */
Note: See TracBrowser for help on using the repository browser.