Mercurial > ecos
comparison packages/net/tcpip/current/include/machine/param.h @ 199:920b9b754b53
Merge from eCos master repository on 2001-12-15-12:00:33-GMT
| author | jlarmour |
|---|---|
| date | Sat, 15 Dec 2001 13:42:19 +0000 |
| parents | 02ea4320376c |
| children | e0c0827131d1 |
comparison
equal
deleted
inserted
replaced
| 198:ea3f0bd33a73 | 199:920b9b754b53 |
|---|---|
| 120 struct net_stats { | 120 struct net_stats { |
| 121 int count; | 121 int count; |
| 122 cyg_uint32 min_time, max_time, total_time; | 122 cyg_uint32 min_time, max_time, total_time; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 #ifdef CYGDBG_NET_TIMING_STATS | |
| 125 #define START_STATS() \ | 126 #define START_STATS() \ |
| 126 cyg_uint32 start_time, end_time, elapsed_time; \ | 127 cyg_uint32 start_time, end_time, elapsed_time; \ |
| 127 HAL_CLOCK_READ(&start_time); | 128 HAL_CLOCK_READ(&start_time); |
| 128 #define FINISH_STATS(stats) \ | 129 #define FINISH_STATS(stats) \ |
| 129 HAL_CLOCK_READ(&end_time); \ | 130 HAL_CLOCK_READ(&end_time); \ |
| 139 stats.min_time = elapsed_time; \ | 140 stats.min_time = elapsed_time; \ |
| 140 if (elapsed_time > stats.max_time) \ | 141 if (elapsed_time > stats.max_time) \ |
| 141 stats.max_time = elapsed_time; \ | 142 stats.max_time = elapsed_time; \ |
| 142 stats.total_time += elapsed_time; \ | 143 stats.total_time += elapsed_time; \ |
| 143 stats.count++; | 144 stats.count++; |
| 145 #else | |
| 146 #define START_STATS() | |
| 147 #define FINISH_STATS(X) | |
| 148 #endif | |
| 144 | 149 |
| 145 // timeout support | 150 // timeout support |
| 146 typedef void (timeout_fun)(void *); | 151 typedef void (timeout_fun)(void *); |
| 147 extern cyg_uint32 timeout(timeout_fun *fun, void *arg, cyg_int32 delta); | 152 extern cyg_uint32 timeout(timeout_fun *fun, void *arg, cyg_int32 delta); |
| 148 extern void untimeout(timeout_fun *fun, void *arg); | 153 extern void untimeout(timeout_fun *fun, void *arg); |
