[parisc-linux] Implementing cancellable syscalls for PA in glibc 2.3.2

Carlos O'Donell carlos@baldric.uwo.ca
Fri, 21 Mar 2003 01:58:08 -0500


PA,

I _know_ in all my PA travels I've seen assembly to do these bits, but
currently my sleepy brain says "write the list, and collate tomorrow."

N.B. It must be assembly, it's GAS, and this will live in glibc, if you
really want to know I'm writing the cancellable syscall support so we
can have a building 2.3.2 :)

---
Task A: Get single thread pointer.

	mfctl cr27, r4;
	* Then I need to load r4->p_header.multiple_threads somehow?*
	* I don't really know if I can just load the struct offset  *
	* without worrying that GCC's padded things...              *

	* Also need to check if this value is non-zero, subtract 1? *

Task B: Save space on the stack.

	stwm r4, STACKSPACE(sp);

Task C: Restore space from stack.

	ldwm -STACKSPACE(sp), r4;

Task D: Push an arg onto the stack.

	stw r2[6543], OFFSET(sp);
	* Remembering that it's 4 bytes per store *

Task E: Get an arg from the stack.

	ldw -OFFSET(sp), r2[6543];
---

Comments and help is welcome :)

c.