DOS --> Linux Question

Colin Coe (coec@altu.net.au)
Fri, 2 Jul 1999 20:38:03 +0800


Hi all

If I have this structure in a header file (NB: this is taken from MS C):
---------------
typedef volatile struct
{
short RomStat; /* ROM Status Word */
unsigned short RomCmd; /* ROM Command Word */
unsigned short RomErr; /* ROM Error Word */
unsigned short DLStart; /* Download start location */
unsigned short BoardType; /* ACL Family product type */
} ACL_ROM;
---------------
and this statement in a C file:
---------------
ACL_ROM *rom;
unsigned long dpaddr=0xD000; /* address of dual port RAM */
<snip, snip>
rom = (ACL_ROM *) MK_FP((dpaddr >> 4), 0); /* make a far pointer to
the dual port */
---------------
What would the equivialent be to the above statement in the Linux universe.

Also, in the book "Linux device drivers", Chapter 6: Flow of Time, under
Delaying Execution, the recommended method of waiting for an event to happen
is:
---------------
int delay_i ( int njiffies )
{
current->timeout = jiffies + njiffies;
current->state = TASK_INTERRUPTIBLE;
schedule(); /* wait for njiffies/HZ sec */

return 0;
}
---------------
Only problem is current->timeout does not seem to exist in 2.3.x, what is it
replaced by, or better still, what is the recommended method in 2.3?

TIA

Colin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/