-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathc_task_queue.h
More file actions
53 lines (41 loc) · 1.6 KB
/
Copy pathc_task_queue.h
File metadata and controls
53 lines (41 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*! @file
@brief
Task::Queue for mruby/c
<pre>
Copyright (C) 2026- HASUMI Hitoshi
This file is distributed under BSD 3-Clause License.
</pre>
*/
#ifndef MRBC_SRC_TASK_QUEUE_H_
#define MRBC_SRC_TASK_QUEUE_H_
/***** Feature test switches ************************************************/
/***** System headers *******************************************************/
/***** Local headers ********************************************************/
#include "value.h"
#ifdef __cplusplus
extern "C" {
#endif
/***** Constant values ******************************************************/
/***** Macros ***************************************************************/
/***** Typedefs *************************************************************/
//================================================================
/*!@brief
Result of mrbc_task_queue_push().
*/
typedef enum {
MRBC_TASK_QUEUE_PUSH_OK = 0, //!< pushed. no task was waiting.
MRBC_TASK_QUEUE_PUSH_OK_WOKE, //!< pushed and a waiting task was woken.
MRBC_TASK_QUEUE_PUSH_CLOSED, //!< the queue is closed.
MRBC_TASK_QUEUE_PUSH_INVALID, //!< not a Task::Queue instance.
} mrbc_task_queue_push_result;
/***** Global variables *****************************************************/
/***** Function prototypes **************************************************/
//@cond
void mrbc_init_task_queue(void);
mrbc_task_queue_push_result mrbc_task_queue_push(mrbc_value *queue, mrbc_value *value);
//@endcond
/***** Inline functions *****************************************************/
#ifdef __cplusplus
}
#endif
#endif // ifndef MRBC_SRC_TASK_QUEUE_H_