Hi... > The kernel is preemptive and context did happen, right? Yep, it is (at least based on what you wrote on the e-mail) > why the same code (without spin lock/preempt_disable()) > works fine by pthread API and looks strange when in the kernel. Please elaborate on what you mean by "works fine by pthread API".... I really don't understand. Attaching source code is better for clarification too. regards Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/