Changeset c0e674a in mainline for libc/generic/async.c
- Timestamp:
- 2006-05-31T16:15:44Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5052046
- Parents:
- b27a97bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/async.c
rb27a97bb rc0e674a 165 165 return 0; 166 166 } 167 static int tv_gteq(struct timeval *tv1, struct timeval *tv2) 168 { 169 if (tv1->tv_sec > tv2->tv_sec) 170 return 1; 171 if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec >= tv2->tv_usec) 172 return 1; 173 return 0; 174 } 167 175 168 176 /* Hash table functions */ … … 241 249 connection_t *conn; 242 250 251 assert(PS_connection); 252 243 253 futex_down(&async_futex); 244 254 … … 436 446 amsg = list_get_instance(timeout_list.next,amsg_t,link); 437 447 gettimeofday(&tv,NULL); 438 if (tv_gt (&tv, &amsg->expires)) {448 if (tv_gteq(&tv, &amsg->expires)) { 439 449 handle_expired_timeouts(); 440 450 continue; … … 589 599 while (tmp != &timeout_list) { 590 600 cur = list_get_instance(tmp, amsg_t, link); 591 if (tv_gt (&cur->expires, &msg->expires))601 if (tv_gteq(&cur->expires, &msg->expires)) 592 602 break; 593 603 tmp = tmp->next;
Note:
See TracChangeset
for help on using the changeset viewer.