Skip to contentSkip to conversation

kernel threads locking data

DISCUSSION Mockern 2 participants 2 messages Mar 4, 2007

lore
Share & tools
lore

Mockern

author
#0 lore raw

hi,

how is better to lock data (a buffer) which is used by 2 kernel threads?

thank you

#1 lore raw
Quoted 4 lines · Mockern

hi,

how is better to lock data (a buffer) which is used by 2 kernel threads?

if it's only used by the threads, and not by anything running in interrupt context, use a mutex.

Documentation/mutex-design.txt has most of the info you'd need.

Cheers,
Kyle