----------------------------------------------------------------------
Fixed the following bugs: 2366: For coldfire port: pbuf is freed twice when no room on output ring. 2368: Coldfire port: buffer cleanup in 5272 driver causes problems. 2376: Can't have timeouts large enough Note that timeouts are now 32 bits. This was done for select() support. Coldfire and unix ports have been updated. Committing in . Modified Files: unix/sys_arch.c
This commit is contained in:
parent
51df05f58a
commit
f71da3c8c8
|
@ -96,8 +96,8 @@ static struct timeval starttime;
|
|||
static struct sys_sem *sys_sem_new_(u8_t count);
|
||||
static void sys_sem_free_(struct sys_sem *sem);
|
||||
|
||||
static u16_t cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex,
|
||||
u16_t timeout);
|
||||
static u32_t cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex,
|
||||
u32_t timeout);
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static struct sys_thread *
|
||||
|
@ -244,10 +244,10 @@ sys_mbox_post(struct sys_mbox *mbox, void *msg)
|
|||
sys_sem_signal(mbox->mutex);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
u16_t
|
||||
sys_arch_mbox_fetch(struct sys_mbox *mbox, void **msg, u16_t timeout)
|
||||
u32_t
|
||||
sys_arch_mbox_fetch(struct sys_mbox *mbox, void **msg, u32_t timeout)
|
||||
{
|
||||
u16_t time = 1;
|
||||
u32_t time = 1;
|
||||
|
||||
/* The mutex lock is quick so we don't bother with the timeout
|
||||
stuff here. */
|
||||
|
@ -317,8 +317,8 @@ sys_sem_new_(u8_t count)
|
|||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static u16_t
|
||||
cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u16_t timeout)
|
||||
static u32_t
|
||||
cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u32_t timeout)
|
||||
{
|
||||
int tdiff;
|
||||
unsigned long sec, usec;
|
||||
|
@ -360,10 +360,10 @@ cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, u16_t timeout)
|
|||
}
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
u16_t
|
||||
sys_arch_sem_wait(struct sys_sem *sem, u16_t timeout)
|
||||
u32_t
|
||||
sys_arch_sem_wait(struct sys_sem *sem, u32_t timeout)
|
||||
{
|
||||
u16_t time = 1;
|
||||
u32_t time = 1;
|
||||
|
||||
pthread_mutex_lock(&(sem->mutex));
|
||||
while(sem->c <= 0) {
|
||||
|
|
Loading…
Reference in New Issue