Skip to main content

Posts

Showing posts from February 26, 2004
sched.c Kernel > sched.c Functions analysis 1. void __preempt_spin_lock(spinlock_t *lock) This function is effective only when kernel is SMP supportive and preemption is enabled. Here, the calling process spins on the lock while permitting preemption. Analysis: If preemption is enabled, then create a Read-write spinlock, allowing multiple readers but only one writer. Otherwise enable preemption, check whether the spinlock is still spinning and disable the preemption, incase it is . Do this till the spin lock exists.