Changeset 04552324 in mainline for kernel/generic/src/synch/workqueue.c
- Timestamp:
- 2012-12-03T14:54:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a440a0f
- Parents:
- 69146b93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/workqueue.c
r69146b93 r04552324 139 139 static void cv_wait(struct work_queue *workq); 140 140 static void nonblock_init(void); 141 142 #ifdef CONFIG_DEBUG 141 143 static bool workq_corrupted(struct work_queue *workq); 142 144 static bool work_item_corrupted(work_t *work_item); 143 145 #endif 144 146 145 147 /** Creates worker thread for the system-wide worker queue. */ … … 204 206 irq_spinlock_lock(&workq->lock, true); 205 207 bool stopped = workq->stopping; 208 #ifdef CONFIG_DEBUG 206 209 size_t running_workers = workq->cur_worker_cnt; 210 #endif 207 211 irq_spinlock_unlock(&workq->lock, true); 208 212 … … 940 944 } 941 945 946 #ifdef CONFIG_DEBUG 942 947 /** Returns true if the workq is definitely corrupted; false if not sure. 943 948 * … … 946 951 static bool workq_corrupted(struct work_queue *workq) 947 952 { 948 #ifdef CONFIG_DEBUG949 953 /* 950 954 * Needed to make the most current cookie value set by workq_preinit() … … 955 959 memory_barrier(); 956 960 return NULL == workq || workq->cookie != WORKQ_MAGIC; 957 #else 958 return false; 961 } 962 963 /** Returns true if the work_item is definitely corrupted; false if not sure. 964 * 965 * Must be used with the work queue protecting spinlock locked. 966 */ 967 static bool work_item_corrupted(work_t *work_item) 968 { 969 return NULL == work_item || work_item->cookie != WORK_ITEM_MAGIC; 970 } 959 971 #endif 960 }961 962 /** Returns true if the work_item is definitely corrupted; false if not sure.963 *964 * Must be used with the work queue protecting spinlock locked.965 */966 static bool work_item_corrupted(work_t *work_item)967 {968 #ifdef CONFIG_DEBUG969 return NULL == work_item || work_item->cookie != WORK_ITEM_MAGIC;970 #else971 return false;972 #endif973 }974 972 975 973 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.