comparison packages/hal/common/current/src/drv_api.c @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents bf00f99aec69
children eb9fd8c04db3
comparison
equal deleted inserted replaced
114:5ad2b71d525e 115:6ed91473a1cd
401 // polling the condition variable's wait member until a DSR sets it to 401 // polling the condition variable's wait member until a DSR sets it to
402 // 0. Note that the semantics of condition variables means that the 402 // 0. Note that the semantics of condition variables means that the
403 // wakeup only happens if there is a thread actually waiting on the CV 403 // wakeup only happens if there is a thread actually waiting on the CV
404 // when the signal is sent. 404 // when the signal is sent.
405 405
406 externC void cyg_drv_cond_wait( cyg_drv_cond_t *cond ) 406 externC cyg_bool cyg_drv_cond_wait( cyg_drv_cond_t *cond )
407 { 407 {
408 CYG_REPORT_FUNCTION(); 408 CYG_REPORT_FUNCTION();
409 409
410 CYG_ASSERT( cond->mutex != NULL, "Uninitialized condition variable"); 410 CYG_ASSERT( cond->mutex != NULL, "Uninitialized condition variable");
411 CYG_ASSERT( cond->mutex->lock, "Mutex not locked"); 411 CYG_ASSERT( cond->mutex->lock, "Mutex not locked");
425 call_dsrs(); 425 call_dsrs();
426 } 426 }
427 427
428 cyg_drv_dsr_unlock(); 428 cyg_drv_dsr_unlock();
429 429
430 CYG_REPORT_RETURN(); 430 CYG_REPORT_RETURN();
431
432 return true;
431 } 433 }
432 434
433 //-------------------------------------------------------------------------- 435 //--------------------------------------------------------------------------
434 // Signal a condition variable. This sets the wait member to zero, which 436 // Signal a condition variable. This sets the wait member to zero, which
435 // has no effect when there is no waiter, but will wake up any waiting 437 // has no effect when there is no waiter, but will wake up any waiting