I have a problem adding the affinity system call - sched_setaffinity to RedHat's Kernel 2.4.18-10.
I tried to merge the implementation for Kernel 2.6.0 to 2.4.18-10 but I don't have in 2.4.18-10 'get_task_struct'.
In the system call I need to call set_cpus_allowed for changing the cpus_allowed bitmap and using the migration thread. In this Kernel the process structure does not have a usage count so my only option is to leave the tasklist_lock held. Doing so, causes a spinlock deadlock.
Is there a solution without adding a referance count to the task structure?