what to use (sem/spinlock/etc)....

From: RANDAZZO
Date: Mon Feb 16 2004 - 08:12:32 EST


I have a register on my hardware that I write to to increment a counter....
..all I want to do is make sure that only one "task" writes at a time,
thus to not corrupt the value......

=EXAMPLE

Task A
- Write new Value to hardware
- Increment Hardware counter
- DONE

Task B
- Write new Value to hardware
- Increment Hardware counter
- DONE

..This will most likely not occur in a inthandler, but may....

...I have to make sure that Task A is "done" before "Task B" or any others
can do their writing....

...any opinion of what I should use....


"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."

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