Thanks a lot for the answer.. I'll try to add lock/unlock in both enqueue/dequeue functions to solve my problem.
But the question is my basic understanding of 2.4 kernel.
As I understand, the 2.4 kernel series are non-preemtive, which means till one system call is not ended (if we talking about single processor machine), nothing could interrupt the system call except the Hardware interrupt.
So, if in HW INT routine (isr()) noone tries to touch the queue (no enqueue/dequeue calls), this means all other calls to dequeue/enqueue are synchronous. If this is correct, why should I to add synchronizing mechanisms into enqueue/dequeue functions?