struct sf_context remove field: remove_from_ready_list
parent
aef9d803d1
commit
f0ee6ce73f
|
|
@ -565,7 +565,6 @@ int receipt_handler_init(FCAddressPtrArray *address_array)
|
|||
}
|
||||
|
||||
sf_enable_thread_notify(true);
|
||||
sf_set_remove_from_ready_list(false);
|
||||
fc_sleep_ms(100);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ SFContext g_sf_context = {{'\0'}, NULL, 0, false, sf_address_family_auto,
|
|||
{{AF_UNSPEC, {{true, fc_comm_type_sock}, {false, fc_comm_type_rdma}}},
|
||||
{AF_UNSPEC, {{true, fc_comm_type_sock}, {false, fc_comm_type_rdma}}}},
|
||||
{DEFAULT_MAX_CONNECTONS, SF_DEF_MAX_PACKAGE_SIZE, SF_DEF_MIN_BUFF_SIZE,
|
||||
SF_DEF_MAX_BUFF_SIZE}, 1, DEFAULT_WORK_THREADS, 0, true, true, true,
|
||||
SF_DEF_MAX_BUFF_SIZE}, 1, DEFAULT_WORK_THREADS, 0, true, true,
|
||||
{false, 0, 0}, {sf_task_finish_clean_up}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -68,10 +68,6 @@ void sf_task_detach_thread(struct fast_task_info *task)
|
|||
&task->event.timer);
|
||||
task->event.timer.expires = 0;
|
||||
}
|
||||
|
||||
if (SF_CTX->remove_from_ready_list) {
|
||||
ioevent_remove(&task->thread_data->ev_puller, task);
|
||||
}
|
||||
}
|
||||
|
||||
void sf_task_switch_thread(struct fast_task_info *task,
|
||||
|
|
|
|||
|
|
@ -68,15 +68,6 @@ static inline void sf_set_connect_done_callback_ex(SFContext *sf_context,
|
|||
sf_set_connect_done_callback_ex(&g_sf_context, done_callback)
|
||||
|
||||
|
||||
static inline void sf_set_remove_from_ready_list_ex(
|
||||
SFContext *sf_context, const bool enabled)
|
||||
{
|
||||
sf_context->remove_from_ready_list = enabled;
|
||||
}
|
||||
|
||||
#define sf_set_remove_from_ready_list(enabled) \
|
||||
sf_set_remove_from_ready_list_ex(&g_sf_context, enabled);
|
||||
|
||||
static inline TaskCleanUpCallback sf_get_task_cleanup_callback_ex(
|
||||
SFContext *sf_context)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -161,7 +161,11 @@ int sf_service_init_ex2(SFContext *sf_context, const char *name,
|
|||
|
||||
if (SF_G_EPOLL_EDGE_TRIGGER) {
|
||||
#ifdef OS_LINUX
|
||||
#if IOEVENT_USE_EPOLL
|
||||
extra_events = EPOLLET;
|
||||
#else
|
||||
extra_events = 0;
|
||||
#endif
|
||||
#elif defined(OS_FREEBSD)
|
||||
extra_events = EV_CLEAR;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -190,7 +190,6 @@ typedef struct sf_context {
|
|||
int work_threads;
|
||||
|
||||
int header_size;
|
||||
bool remove_from_ready_list;
|
||||
bool realloc_task_buffer;
|
||||
bool connect_need_log; //for client connect
|
||||
FCSmartPollingConfig smart_polling;
|
||||
|
|
|
|||
Loading…
Reference in New Issue