Pages

Change in uasage of Current Pointer (task_struct)

The current pointer which gives us information regarding the current process under execution during kernel programming has undergone a chagne after 2.6.20. Previously the way of accessing the various fields of the task_struct using current was to treat current as a pointer to the task_struct.
Thus if we wanted t access the current user id (for eg) we would use the syntax
current->uid

But this has chagned now and instead of using it as a pointer there are functions that return us the required value for eg : accessing user id has now become
 current_uid().

No comments:

Post a Comment