lkml.org 
[lkml]   [1996]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SUMMARY: Kernel Threads Usable By Mortals
Date
> calls which eventually will cause a kernel oops. Bet its nothing that
> a little more locking, some extra calls to verify_area(), and some
> extra error checking couldn't cure in a future release.

Its quite big to avoid deadlocks in some areas. The oops are non
fatal.

> The kernel does not provide any locking functions to help threads
> syncronise and not step all over each other. Apparently a locking
> mechanism could be hacked out of the IPC functions, but that is

The IPC functions provide semaphores with non deadlock semantics and
multiple simultaneous updates. They are precisely what people need.

> considered to be quite a dirty approach. Someone posted some code to
> the linux-smp list not long ago which implemented a spin lock in user
> mode by making use of the atomic compare and exchange instruction on
> the iX86. It is as atomic as can be, and is guaranteed

Please see lock_kernel() in the Linux source.



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.338 / U:1.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site