2 * SPDX-License-Identifier: BSD-3-Clause
3 * Copyright 2015 Intel Corporation.
4 * Copyright 2012 Hasan Alayli <halayli@gmail.com>
13 #include <rte_per_lcore.h>
15 #include "lthread_api.h"
16 #include "lthread_diag.h"
21 /* function to be called when a context function returns */
22 typedef void (*lthread_exit_func) (struct lthread *);
24 void _lthread_exit_handler(struct lthread *lt);
26 void lthread_set_funcname(const char *f);
28 void _lthread_sched_busy_sleep(struct lthread *lt, uint64_t nsecs);
30 int _lthread_desched_sleep(struct lthread *lt);
32 void _lthread_free(struct lthread *lt);
34 struct lthread_sched *_lthread_sched_get(unsigned int lcore_id);
36 struct lthread_stack *_stack_alloc(void);
39 lthread_sched *_lthread_sched_create(size_t stack_size);
42 _lthread_init(struct lthread *lt,
43 lthread_func_t fun, void *arg, lthread_exit_func exit_handler);
45 void _lthread_set_stack(struct lthread *lt, void *stack, size_t stack_size);
51 #endif /* LTHREAD_H_ */