This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

System timer resolution and TCP/IP package


Hi!

I would like to go back to some aspects of the discussion a two months ago:
http://sources.redhat.com/ml/ecos-discuss/2001-11/msg00363.html
Namely, I am interested in running TCP/IP stack with a 1ms system timer
resolution:
http://sources.redhat.com/ml/ecos-discuss/2001-12/msg00016.html


I just glanced the code and it seems that to get the stack running on 1ms
tick one should:

1. Modify the hard coded values for 'hz' and 'tick' in 'src/ecos/support.c'
int hz = 100;
int tick = 10000;
should be something like:
int hz = 1000000000 / (CYGNUM_HAL_RTC_NUMERATOR /
CYGNUM_HAL_RTC_DENOMINATOR);
int tick = (CYGNUM_HAL_RTC_NUMERATOR / CYGNUM_HAL_RTC_DENOMINATOR) / 1000;


2. Modify the hardcode values in 'src/lib/select.c', _cyg_select() function,
line 98:
ticks = (tv->tv_sec * 100) + (tv->tv_usec / 10000);
should be something like:
ticks = (tv->tv_sec * hz) + (tv->tv_usec / tick);


3. Check the cyg_thread_delay() calls:
+ src/lib/network_support.c:
3 cyg_thread_delay() with fixed values. They look ok (are they?).
+ src/lib/tftp_server.c:
cyg_thread_delay(1) seems fine.
+ src/lib/dhcp_prot.c:
cyg_thread_delay(100) seems fine (is it?)


4. Modify hardcode values in tests (where necessary).



Is that all or I have overlooked something?


Regards,
Jura



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]