thanks rajat, and of course mulyadi , sorry for the confusion. @ mulyadi : u got me right as u always do. :) except system dependencies is there anything which should be taken care of before implementing this task??
On Tue, Jan 11, 2011 at 3:40 PM, Rajat Sharma <[email protected]> wrote: > > is there any procedure in kernel to check for the interrupt vector number > which caused it to be invoked? > Its actually very architecture dependent, on x86, its 'int $0x80' > which causes user space to call system calls handlers. Recent intel > architectures have callgate mechanism to enter into system call, look > for sysenter instruction. > Anyways, are you interested in interrupt number or the system call number? > > > i mean like one of my friends said that when kernel is about to restart > a > > syscall then it raises signal -ERESTARTSYS signal for signal handler. > > Thats totally wrong. Like any other error code, its just an error code > which waiting API return if process was interrupted while waiting on > semaphore, e.g. > > rc = wait_event_inetrruptible(..); > if (rc == -ERESTARTSYS) { > /* > * your driver should take corrective measure, may be to retry the > code path again, > * or do some error recovery and send appropriate error code to user > space. > * Note that conventionally -ERESTARTSYS should never be returned > to user space > */ > } > > Although name is misleading, its an internal kernel error and is not > at all related to system call restart. > > Rajat > > On Tue, Jan 11, 2011 at 1:09 PM, Mulyadi Santosa > <[email protected]> wrote: > > just to avoid confusion 1st... > > > > On Tue, Jan 11, 2011 at 14:06, mohit verma <[email protected]> > wrote: > >> i mean like one of my friends said that when kernel is about to restart > a > >> syscall then it raises signal -ERESTARTSYS signal for signal handler. > but i > >> think it is for > >> something went wrong and kernel wanna start the syscall again. but in > >> between a syscall routine is it possible to get vector number (i repeat > >> ,sorry) ?? > > > > allow me to rephrase it: if an interrupt crosses by during the > > execution of that code path, you wanna find out the interrupt number? > > > > -- > > regards, > > > > Mulyadi Santosa > > Freelance Linux trainer and consultant > > > > blog: the-hydra.blogspot.com > > training: mulyaditraining.blogspot.com > > > > _______________________________________________ > > Kernelnewbies mailing list > > [email protected] > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > -- ........................ *MOHIT VERMA*
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
