Messages in this thread | | | Date | Mon, 16 Feb 2004 15:20:27 +0000 | From | Paulo Marques <> | Subject | Re: what to use (sem/spinlock/etc).... |
| |
RANDAZZO@ddc-web.com wrote:
> 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....
You can read the "Unreliable Guide To Locking" from Rusty Russell at:
http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/
I hope this helps,
-- Paulo Marques - www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |