Search notes:

Kernel lock: spinlock

A spinlock is a simple single-holder lock. If the lock can not be acquired, the process keeps trying (=spinning) until it is possible.
Spinlocks are small, fast and can be used anywhere.
spinlock_t the_lock;
spinlock_init(&the_lock);

spin_lock(&the_lock);
do_something();
do_more();	
spin_unlock(&the_lock);

CONFIG_SMP and CONFIG_PREEMPT

Kernels without CONFIG_SMP and CONFIG_PREEMPT do not have spinlocks because no other process can run at the sime time anyway.
If compiled without CONFIG_SMP but with CONFIG_PREEMPT, spinlocks simply disable preemption.

See also

Kernel locks, mutexes

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/ke...', 1759416417, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/kernel/locks/spinlock(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78