From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6a3ae47e0807080601m30b6da97w782bde83f91055cf@mail.gmail.com> Date: Tue, 8 Jul 2008 14:01:27 +0100 From: "Robert Raschke" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] P9P libthread on Debian ARM vs. makecontext et al. Topicbox-Message-UUID: de24b9d0-ead3-11e9-9d60-3106f5b1d025 Hi, I recently got myself a lovely Nokia N810 internet tablet. That runs Debian ARM and I thought I'd have a stab at compiling P9P for it. Unfortunately, the makecontext/swapcontext calls are not supported on that platform by Debian. I noticed that libthread/Linux.c has implementations of those two functions for ARM. So I thought I try compiling libthread without pthread support. This time, it's the mcontext_t (aka sigcontext) struct that is causing an issue. The Debian ARM sigcontext struct looks like this: struct sigcontext { unsigned long trap_no; unsigned long error_code; unsigned long oldmask; unsigned long arm_r0; ... unsigned long arm_r10; unsigned long arm_fp; unsigned long arm_ip; unsigned long arm_sp; unsigned long arm_lr; unsigned long arm_pc; unsigned long arm_cpsr; unsigned long fault_address; }; The code in Linux.c that implements makecontext() for ARM expects this struct to contain a gregs array. I'm guessing that gregs is the same as the enumerated arm_* ones above. So, would I be correct in assuming that gregs[13] is arm_sp and gregs[14] is arm_lr? Thanks, Robby