/[lwip]/lwip/src/core/sys.c
ViewVC logotype

Diff of /lwip/src/core/sys.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by davidhaas, Thu Feb 6 22:18:56 2003 UTC revision 1.5.2.1 by likewise, Wed Feb 19 12:41:34 2003 UTC
# Line 172  sys_timeout(u32_t msecs, sys_timeout_han Line 172  sys_timeout(u32_t msecs, sys_timeout_han
172        
173    timeouts = sys_arch_timeouts();    timeouts = sys_arch_timeouts();
174        
175    DEBUGF(SYS_DEBUG, ("sys_timeout: %p msecs=%u h=%p arg=%p\n", (void *)timeout, msecs, (void *)h, (void *)arg));    DEBUGF(SYS_DEBUG, ("sys_timeout: %p msecs=%lu h=%p arg=%p\n", (void *)timeout, msecs, (void *)h, (void *)arg));
176    
177    LWIP_ASSERT("sys_timeout: timeouts != NULL", timeouts != NULL);    LWIP_ASSERT("sys_timeout: timeouts != NULL", timeouts != NULL);
178    if(timeouts->next == NULL) {    if(timeouts->next == NULL) {
# Line 206  sys_timeout(u32_t msecs, sys_timeout_han Line 206  sys_timeout(u32_t msecs, sys_timeout_han
206  */  */
207  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
208  void  void
209  sys_timeout_remove(sys_timeout_handler h, void *arg)  sys_untimeout(sys_timeout_handler h, void *arg)
210  {  {
211      struct sys_timeouts *timeouts;      struct sys_timeouts *timeouts;
212      struct sys_timeout *prev_t, *t;      struct sys_timeout *prev_t, *t;
# Line 245  sswt_handler(void *arg) Line 245  sswt_handler(void *arg)
245  {  {
246      struct sswt_cb *sswt_cb = (struct sswt_cb *) arg;      struct sswt_cb *sswt_cb = (struct sswt_cb *) arg;
247            
248      /* Timeout. Set flag to TRUE and signal semephore */      /* Timeout. Set flag to TRUE and signal semaphore */
249      sswt_cb->timeflag = 1;      sswt_cb->timeflag = 1;
250      sys_sem_signal(*(sswt_cb->psem));      sys_sem_signal(*(sswt_cb->psem));
251  }  }
# Line 274  sys_sem_wait_timeout(sys_sem_t sem, u32_ Line 274  sys_sem_wait_timeout(sys_sem_t sem, u32_
274          return 0;          return 0;
275      } else {      } else {
276          /* Not a timeout. Remove timeout entry */          /* Not a timeout. Remove timeout entry */
277          sys_timeout_remove(sswt_handler, &sswt_cb);          sys_untimeout(sswt_handler, &sswt_cb);
278          return 1;          return 1;
279      }      }
280            

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26