[Devel] Re: [RFC v14-rc3][PATCH 15/36] c/r of restart-blocks

Dan Smith danms at us.ibm.com
Tue Apr 7 12:05:28 PDT 2009


OL> +	/* were we from a system call?  if so, get old error/retval */
OL> +	if (syscall_get_nr(current, regs) >= 0)
OL> +		ret = syscall_get_error(current, regs);

OL> The test "were we from a system call ?" is implemented differently
OL> on the s390, for example. Compare the code in handle_signal(),
OL> whose logic I follow.

As far as I can tell, handle_signal() doesn't make that determination
on s390.  However, do_signal() does:

  /* Are we from a system call? */
  if (regs->svcnr) {

which is identical to the outcome of your code, based on the
implementation of syscall_get_nr():

  static inline long syscall_get_nr(struct task_struct *task,
  				  struct pt_regs *regs)
  {
  	return regs->svcnr ? regs->svcnr : -1;
  }

Perhaps I need to further study where your function is used to figure
out what obscure details I'm missing... :)

-- 
Dan Smith
IBM Linux Technology Center
email: danms at us.ibm.com

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list