I’m porting device driver for vxwork to qnx 6.30 and i have problem with following:
/*
** Delaying execution
**
** os_get_time() Return system time since boot in ticks.
**
** os_delay_busy_us() Busy-delay for specified microseconds.
** Ties up the CPU it runs on.
**
** os_delay_thread() Delay for specified number of ticks. Must
** be running in a thread context and may be
** interrupted by signals.
**
** Returns TRUE if interrupted by a signal,
** otherwise FALSE.
*/
But there is no other code (I don’t count 1 cover function and a macro as code)!
I suppose what you are asking is what are the equivalent of the following:
sysClkRateGet();
tickGet();
taskDelay();
The problem is I can’t give equivalents unless you specifiy the semantics of these calls. I can guess that tickGet() returns the current OS tick count; what I can’t guess is what exactly the tick count means on VxWorks (e.g. what is the period of a tick?).
I can direct you to the calls that I think might work for you. Look at:
/-------------------
sysClkRateGet() return the nurmer of ticks for second.
In QNX
A tick’s initial length is determined by the clock rate of your processor:
CPU clock speed: Default value:
= 40MHz 1 millisecond
< 40MHz 10 milliseconds
then there is 1000 ticks for second, that is true?
/------------------------------
tickGet() Return system time since boot in ticks, this function it’s use for compute the consumed time for some instructions.
I think that have use this function clock(), the logic is the same, is correct?