Codebase list httping / dface7a
Fix for netbsd usleep issue Folkert van Heusden 7 years ago
3 changed file(s) with 16 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
18411841 * I know of no other way to wait for the kernel to
18421842 * finish the transmission
18431843 */
1844 usleep(write_sleep);
1844 myusleep(write_sleep);
18451845 }
18461846 #endif
18471847
23762376 cur_sleep = wait - interval_left;
23772377 }
23782378
2379 usleep((useconds_t)(cur_sleep * 1000000.0));
2379 myusleep((useconds_t)(cur_sleep * 1000000.0));
23802380 }
23812381
23822382 reset_statst_cur(&t_resolve);
114114
115115 return out;
116116 }
117
118 void myusleep(useconds_t v)
119 {
120 int s = v / 1000000;
121
122 if (s)
123 sleep(s);
124
125 v %= 1000000;
126 if (v)
127 usleep(v);
128 }
1414
1515 #define min(x, y) ((x) < (y) ? (x) : (y))
1616 #define max(x, y) ((x) > (y) ? (x) : (y))
17
18 void myusleep(useconds_t v);