Re: [Re: __asm__ ]

2001-05-23 Thread David Howells
Okay, "current" is a macro on i386 that expands to "get_current()". This gets the task_struct for the task currently running on the CPU executing the code. It does this by masking out the bottom bits of its kernel stack pointer. For example, assuming that some running process has the following

Re: [Re: __asm__ ]

2001-05-23 Thread =C0=CC=C8=A3
Blesson Paul Wrote: > Thanks for the reply. I am sorry that I misspelled the > line(__asm__()). It is from the get_current() function in > asm-i386/current.h. But I am not clear what is the whole meaning of that > line(__asm__(..)) in get_current(). I am doing a project in

Re: [Re: __asm__ ]

2001-05-23 Thread Blesson Paul
Hi David Thanks for the reply. I am sorry that I misspelled the line(__asm__()). It is from the get_current() function in asm-i386/current.h. But I am not clear what is the whole meaning of that line(__asm__(..)) in get_current(). I am doing a project in Linux related to

Re: __asm__

2001-05-23 Thread David Howells
> __asm__("and 1 %%esp.%0; ":"=r" (current) : "0" (~8191UL)); This doesn't look right... Where did you get this from. Taking the one in include/asm-i386/current.h as an example: | __asm__( This signifies a piece of inline assembly that the compiler must insert into it's output code. The

Re: __asm__

2001-05-23 Thread David Howells
__asm__(and 1 %%esp.%0; :=r (current) : 0 (~8191UL)); This doesn't look right... Where did you get this from. Taking the one in include/asm-i386/current.h as an example: | __asm__( This signifies a piece of inline assembly that the compiler must insert into it's output code. The __asm__ is

Re: [Re: __asm__ ]

2001-05-23 Thread Blesson Paul
Hi David Thanks for the reply. I am sorry that I misspelled the line(__asm__()). It is from the get_current() function in asm-i386/current.h. But I am not clear what is the whole meaning of that line(__asm__(..)) in get_current(). I am doing a project in Linux related to

Re: [Re: __asm__ ]

2001-05-23 Thread =C0=CC=C8=A3
Blesson Paul Wrote: Thanks for the reply. I am sorry that I misspelled the line(__asm__()). It is from the get_current() function in asm-i386/current.h. But I am not clear what is the whole meaning of that line(__asm__(..)) in get_current(). I am doing a project in

Re: [Re: __asm__ ]

2001-05-23 Thread David Howells
Okay, current is a macro on i386 that expands to get_current(). This gets the task_struct for the task currently running on the CPU executing the code. It does this by masking out the bottom bits of its kernel stack pointer. For example, assuming that some running process has the following