Changeset b7398c0 in mainline
- Timestamp:
- 2010-05-25T21:32:32Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5df7928
- Parents:
- a9f1372
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/waitq.h
ra9f1372 rb7398c0 80 80 extern void waitq_interrupt_sleep(struct thread *); 81 81 extern void waitq_unsleep(waitq_t *); 82 extern int waitq_count_get(waitq_t *); 83 extern void waitq_count_set(waitq_t *, int val); 82 84 83 85 #endif -
kernel/generic/src/synch/waitq.c
ra9f1372 rb7398c0 505 505 } 506 506 507 /** Get the missed wakeups count. 508 * 509 * @param wq Pointer to wait queue. 510 * @return The wait queue's missed_wakeups count. 511 */ 512 int waitq_count_get(waitq_t *wq) 513 { 514 int cnt; 515 516 irq_spinlock_lock(&wq->lock, true); 517 cnt = wq->missed_wakeups; 518 irq_spinlock_unlock(&wq->lock, true); 519 520 return cnt; 521 } 522 523 /** Set the missed wakeups count. 524 * 525 * @param wq Pointer to wait queue. 526 * @param val New value of the missed_wakeups count. 527 */ 528 void waitq_count_set(waitq_t *wq, int val) 529 { 530 irq_spinlock_lock(&wq->lock, true); 531 wq->missed_wakeups = val; 532 irq_spinlock_unlock(&wq->lock, true); 533 } 534 507 535 /** @} 508 536 */
Note:
See TracChangeset
for help on using the changeset viewer.