Skip to content

Commit ead5548

Browse files
author
zhengshuxin
committed
compling fiber module.
1 parent f31a3c3 commit ead5548

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib_fiber/c/src/hook/epoll.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ struct EPOLL {
5151

5252
/****************************************************************************/
5353

54+
static __thread int __fiber_share_epoll = 0;
55+
56+
void acl_fiber_share_epoll(int yes)
57+
{
58+
__fiber_share_epoll = yes;
59+
}
60+
5461
static void epoll_event_free(EPOLL_EVENT *ee)
5562
{
5663
mem_free(ee);
@@ -124,7 +131,6 @@ static __thread ARRAY *__epfds = NULL;
124131

125132
static pthread_key_t __once_key;
126133
static pthread_once_t __once_control = PTHREAD_ONCE_INIT;
127-
static __thread int __fiber_share_epoll = 0;
128134

129135
static void epoll_free(EPOLL *ep);
130136

@@ -354,11 +360,6 @@ int epoll_close(int epfd)
354360
return (*sys_close)(epfd);
355361
}
356362

357-
void acl_fiber_share_epoll(int yes)
358-
{
359-
__fiber_share_epoll = yes;
360-
}
361-
362363
// Find the EPOLL_EVENT for the current fiber with the specified epfd, and
363364
// new one will be created if not found and create is true.
364365
static EPOLL_EVENT *epoll_event_find(int epfd, int create)

0 commit comments

Comments
 (0)