mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2026-08-27 17:01:31 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
37
Living_SDK/kernel/yloop/yloop.h
Normal file
37
Living_SDK/kernel/yloop/yloop.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
|
||||
*/
|
||||
|
||||
#ifndef YLOOP_H
|
||||
#define YLOOP_H
|
||||
|
||||
typedef struct {
|
||||
int sock;
|
||||
void *private_data;
|
||||
aos_poll_call_t cb;
|
||||
} yloop_sock_t;
|
||||
|
||||
typedef struct {
|
||||
dlist_t timeouts;
|
||||
struct pollfd *pollfds;
|
||||
yloop_sock_t *readers;
|
||||
int eventfd;
|
||||
uint8_t max_sock;
|
||||
uint8_t reader_count;
|
||||
bool pending_terminate;
|
||||
bool terminate;
|
||||
} yloop_ctx_t;
|
||||
/* set loop's event fd */
|
||||
void aos_loop_set_eventfd(int fd);
|
||||
|
||||
/* get loop's event fd */
|
||||
int aos_loop_get_eventfd(void *loop);
|
||||
|
||||
/* init per-loop event service */
|
||||
int aos_event_service_init(void);
|
||||
|
||||
/* deinit per-loop event service */
|
||||
void aos_event_service_deinit(int fd);
|
||||
|
||||
#endif /* YLOOP_H */
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue