Changeset 1328:81af4f5a517a in freeDiameter for libfdcore/routing_dispatch.c
- Timestamp:
- Nov 27, 2017, 11:22:42 PM (6 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/routing_dispatch.c
r1301 r1328 1075 1075 struct msg * msg; 1076 1076 1077 /* Test the current order */1078 {1079 int must_stop;1080 CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), { ASSERT(0); } ); /* we lock to flush the caches */1081 must_stop = (order_val == STOP);1082 CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), { ASSERT(0); } );1083 if (must_stop)1084 goto end;1085 1086 pthread_testcancel();1087 }1088 1089 /* Ok, we are allowed to run */1090 1091 1077 /* Get the next message from the queue */ 1092 1078 { … … 1098 1084 1099 1085 ret = fd_fifo_timedget ( queue, &msg, &ts ); 1100 if (ret == ETIMEDOUT) 1101 /* loop, check if the thread must stop now */ 1086 if (ret == ETIMEDOUT) { 1087 /* Test the current order */ 1088 { 1089 int must_stop; 1090 CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), { ASSERT(0); } ); /* we lock to flush the caches */ 1091 must_stop = (order_val == STOP); 1092 CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), { ASSERT(0); } ); 1093 if (must_stop) 1094 goto end; 1095 1096 pthread_testcancel(); 1097 } 1098 /* Ok, we are allowed to continue */ 1102 1099 continue; 1100 } 1103 1101 if (ret == EPIPE) 1104 1102 /* The queue was destroyed, we are probably exiting */
Note: See TracChangeset
for help on using the changeset viewer.