Project

General

Profile

Backport #5757 » bug5757.patch

nagachika (Tomoyuki Chikanaga), 12/14/2011 09:45 PM

View differences:

thread_pthread.c
1024 1024
    ubf_select_each(th);
1025 1025
}
1026 1026

  
1027
static int
1027
static void
1028 1028
ping_signal_thread_list(void) {
1029 1029
    if (signal_thread_list_anchor.next) {
1030 1030
	FGLOCK(&signal_thread_list_lock, {
......
1036 1036
		list = list->next;
1037 1037
	    }
1038 1038
	});
1039
	return 1;
1040 1039
    }
1041
    else {
1040
}
1041

  
1042
static int
1043
check_signal_thread_list(void)
1044
{
1045
    if (signal_thread_list_anchor.next)
1046
	return 1;
1047
    else
1042 1048
	return 0;
1043
    }
1044 1049
}
1045 1050
#else /* USE_SIGNAL_THREAD_LIST */
1046 1051
#define add_signal_thread_list(th) (void)(th)
1047 1052
#define remove_signal_thread_list(th) (void)(th)
1048 1053
#define ubf_select 0
1049
static int ping_signal_thread_list(void) { return 0; }
1054
static void ping_signal_thread_list(void) { return; }
1055
static int check_signal_thread_list(void) { return 0; }
1050 1056
#endif /* USE_SIGNAL_THREAD_LIST */
1051 1057

  
1052 1058
static int timer_thread_pipe[2] = {-1, -1};
......
1140 1146
	int need_polling;
1141 1147

  
1142 1148
	/* timer function */
1143
	need_polling = ping_signal_thread_list();
1149
	ping_signal_thread_list();
1144 1150
	timer_thread_function(0);
1151
	need_polling = check_signal_thread_list();
1145 1152

  
1146 1153
	if (TT_DEBUG) WRITE_CONST(2, "tick\n");
1147 1154