|
|
Up |
|
|
  |
Author: Russ CoxRuss Cox Date: Jun 27, 2008 08:34
It looks like calling fork() in OS X 10.5 doesn't
copy the alternate signal stack information into
the child. If you add the -F flag to keep it from
forking into the background, Andrey says it
works fine.
I'll tweak the code to work around this later.
For now, just use -F.
Russ
|
| |
|
| | 11 Comments |
|
  |
Author: David LeimbachDavid Leimbach Date: Jun 27, 2008 08:39
Yep that's working ok. Though I'm losing the ability to send capital
letters to X11 in general, I'm not sure if that's an artifact of this or
not.
Dave
On Fri, Jun 27, 2008 at 8:31 AM, Russ Cox swtch.com> wrote:
> It looks like calling fork() in OS X 10.5 doesn't
> copy the alternate signal stack information into
> the child. If you add the -F flag to keep it from
> forking into the background, Andrey says it
> works fine.
>
> I'll tweak the code to work around this later.
> For now, just use -F.
>
> Russ
>
>
>
|
| Show full article (1.05Kb) |
|
| | 8 Comments |
|
  |
Author: andrey mirtchovskiandrey mirtchovski Date: Jun 27, 2008 08:59
I can send capital letters just fine, but I can't chord with the
option/apple buttons like I'm used to on the native drawterm/acme.
Need to get the latest changes from acme-sac.osx and write a native
client, I suppose :)
Is it supposed to run at full-load? Both cores are fully utilized and
9vx.OSX uses 187%% of the cpu at all times. dtruss reports that the
main thread is just sitting there doing "select_nocancel(0x0,0x0,0x0)"
with timeouts.
On Fri, Jun 27, 2008 at 9:39 AM, David Leimbach gmail.com> wrote:
> Yep that's working ok. Though I'm losing the ability to send capital
> letters to X11 in general, I'm not sure if that's an artifact of this or
> not.
> Dave
>
|
| |
| 3 Comments |
|
  |
Author: ron minnichron minnich Date: Jun 27, 2008 09:07
On Fri, Jun 27, 2008 at 8:56 AM, andrey mirtchovski
gmail.com> wrote:
>
> Is it supposed to run at full-load? Both cores are fully utilized and
> 9vx.OSX uses 187%% of the cpu at all times. dtruss reports that the
> main thread is just sitting there doing "select_nocancel(0x0,0x0,0x0)"
> with timeouts.
is that hlt() :-)
ron
|
| |
| no comments |
|
  |
Author: roger pepperoger peppe Date: Jun 27, 2008 09:09
i discovered a macos x nasty a while ago that
means that if you've forked, then accessing certain
library calls (anything Carbon?) draws an error.
the stated reason for doing this is that the library
doesn't work if the stack has been copied,
but it's a bit of a bugger if you're just forking
to put yourself in the background.
is it possible that you're running up against this?
BTW when i try to make vx32 (under macos 10.5.3) i get the following:
%% make
make: vx32-gcc: Command not found
make: vx32-gcc: Command not found
gcc -m32 -c -nostdinc -Ilibvxc/include -g -O3 -MD -std=gnu99 -I.
-m80387 -mfp-ret-in-387 -o libvxc/_exit.o libvxc/_exit.c
libvxc/_exit.c: In function '_exit':
libvxc/syscall.h:8: error: can't find a register in class 'BREG' while
reloading 'asm'
make: *** [libvxc/_exit.o] Error 1
|
| Show full article (1.33Kb) |
| 1 Comment |
|
  |
Author: David LeimbachDavid Leimbach Date: Jun 27, 2008 09:38
Funny! Chording works great for me! (I'm suspecting my X11 is borked
though, it may be completely unrelated to this project).
On Fri, Jun 27, 2008 at 8:56 AM, andrey mirtchovski gmail.com>
wrote:
|
| Show full article (1.82Kb) |
| 1 Comment |
|
  |
Author: andrey mirtchovskiandrey mirtchovski Date: Jun 27, 2008 09:44
On Fri, Jun 27, 2008 at 10:34 AM, David Leimbach gmail.com> wrote:
> Funny! Chording works great for me! (I'm suspecting my X11 is borked
> though, it may be completely unrelated to this project).
button 2/3 emulation with option and apple keys works, but i'm using
button1+option+apple to snarf/paste very often, that is the one that
is not working for me (naturally it works with a 3-button mouse).
|
| |
| no comments |
|
  |
Author: andrey mirtchovskiandrey mirtchovski Date: Jun 27, 2008 09:47
trying to answer my own question about high cpu load, it looks like
9vx is busy switching all the time. if anyone knows these tracing
facilities better, please step up :)
dappprof (profiles execution, elapsed time is in nanoseconds):
CALL ELAPSED
libSystem.B.dylib swtch_pri 67472182
libSystem.B.dylib sched_yield 75788623
9vx.OSX unlock 297823144
9vx.OSX lock 362717059
9vx.OSX canlock 516405744
libSystem.B.dylib pthread_getspecific 42273900861098
9vx.OSX getmach 46118238370761
libSystem.B.dylib pthread_cond_wait 65330580967450
libSystem.B.dylib _pthread_cond_wait 222897259712785
9vx.OSX __i686.get_pc_thunk.bx 1256657382372551
dapptrace (traces execution, only a small fragment is listed, without
thread ids):
-> libSystem.B.dylib:sched_yield(0xF30E0, 0xF30E0, 0xB038CE88)
-> libSystem.B.dylib:swtch_pri(0x0, 0x0, 0x0)
-> libSystem.B.dylib:_sysenter_trap(0x93846BC1, 0x0, 0x0)
<- libSystem.B.dylib:swtch_pri...
|
| Show full article (4.77Kb) |
| no comments |
|
  |
Author: Russ CoxRuss Cox Date: Jun 27, 2008 10:03
Replying to many messages... please read to find yours.
> Yep that's working ok. Though I'm losing the ability to send capital
> letters to X11 in general, I'm not sure if that's an artifact of this or
> not.
Almost certainly not. The -F workaround is about new fork
semantics. The capital letters thing may be that I missed an
OS X-specific fix in the X code, imported from p9p.
I hope someone will take it upon themselves to hook the
drawterm Carbon code in instead.
> Is it supposed to run at full-load? Both cores are fully utilized and
> 9vx.OSX uses 187%% of the cpu at all times. dtruss reports that the
> main thread is just sitting there doing "select_nocancel(0x0,0x0,0x0)"
> with timeouts.
|
| Show full article (2.80Kb) |
| 3 Comments |
|
  |
|
|
  |
Author: andrey mirtchovskiandrey mirtchovski Date: Jun 27, 2008 10:43
> make 9vx/9vx
on 10.5.3 that fails with:
gcc -g -O3 -MD -std=gnu99 -I. -I. -I9vx -I9vx/a -Wall
-Wno-missing-braces -c -o 9vx/main.o 9vx/main.c
9vx/main.c: In function 'sigsegv':
9vx/main.c:491: error: 'struct __darwin_mcontext32' has no member named 'es'
9vx/main.c:492: error: 'struct __darwin_mcontext32' has no member named 'ss'
9vx/main.c:493: error: 'struct __darwin_mcontext32' has no member named 'ss'
make: *** [9vx/main.o] Error 1
turns out that osx exposes __es and __ss for mcontext in
/usr/include/mach/i386/_structs.h. this fixes it:
gcc -D__DARWIN_UNIX03=0 -g -O3 -MD -std=gnu99 -I. -I. -I9vx -I9vx/a
-Wall -Wno-missing-braces -c -o 9vx/main.o 9vx/main.c
a bit later on:
gcc -Ilibvx32 -c -g -O3 -MD -std=gnu99 -I. -o libvx32/emu.o libvx32/emu.c
libvx32/emu.c: In function 'vxproc_run':
libvx32/emu.c:1796: error: storage size of 'env' isn't known
make: *** [libvx32/emu.o] Error 1
is fixed identically by:
|
| Show full article (1.58Kb) |
| 1 Comment |
|
RELATED THREADS |
  |
|
|
|
|
|