|
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 |
|
|---|
| 23 | typedef struct fibril fibril_t;
|
|---|
| 24 |
|
|---|
| 25 | typedef struct {
|
|---|
| 26 | fibril_t *owned_by;
|
|---|
| 27 | } fibril_owner_info_t;
|
|---|
| 28 |
|
|---|
| 29 | typedef fibril_t *fid_t;
|
|---|
| 30 |
|
|---|
| 31 | #ifndef __cplusplus
|
|---|
| 32 | /** Fibril-local variable specifier */
|
|---|
| 33 | #define fibril_local __thread
|
|---|
| 34 | #endif
|
|---|
| 35 |
|
|---|
| 36 | extern fid_t fibril_create_generic(errno_t (*)(void *), void *, size_t);
|
|---|
| 37 | extern fid_t fibril_create(errno_t (*)(void *), void *);
|
|---|
| 38 | extern void fibril_destroy(fid_t);
|
|---|
| 39 | extern void fibril_add_ready(fid_t);
|
|---|
| 40 | extern fid_t fibril_get_id(void);
|
|---|
| 41 | extern void fibril_yield(void);
|
|---|
| 42 |
|
|---|
| 43 | extern void fibril_usleep(usec_t);
|
|---|
| 44 | extern void fibril_sleep(sec_t);
|
|---|
| 45 |
|
|---|
| 46 | extern void fibril_enable_multithreaded(void);
|
|---|
| 47 | extern int fibril_test_spawn_runners(int);
|
|---|
| 48 |
|
|---|
| 49 | extern void fibril_detach(fid_t fid);
|
|---|
| 50 |
|
|---|
| 51 | extern void fibril_start(fid_t);
|
|---|
| 52 | extern __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.