return ((unsigned int)(unsigned long)base & TBASE_DEFERRABLE_FLAG);What is the above function returning.I am not clear with definition of what is being returned in the above code.
3 replies to this topic
#1
Posted 15 November 2010 - 02:45 AM
On this link [i386] linux-2.6.25/kernel/timer.c a return type is defined
|
|
|
#2
Posted 15 November 2010 - 02:59 AM
base is being cast into an unsigned long, and the result of base & TBASE_DEFERRABLE_FLAG is being cast into an unsigned int.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 15 November 2010 - 06:25 AM
Hi,
The
could be explained as follow
1. base is casted into unsigned long data type
2. the result of the case is being operation by bit operated '&'.
3. the final result is transformed to 'int' data type which is the return type of the function.
I hope this helps
The
return ((unsigned int)(unsigned long)base & TBASE_DEFERRABLE_FLAG);
could be explained as follow
1. base is casted into unsigned long data type
2. the result of the case is being operation by bit operated '&'.
3. the final result is transformed to 'int' data type which is the return type of the function.
I hope this helps
#4
Posted 15 November 2010 - 06:20 PM
Yes this helps.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









