Re: [AD] [LNX] Mode-X and threads and mouse

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> (You mean 770, 896, 1628.)

Yes of course, I didn't take into account the vga module patch.

> I suppose those functions are not reentrant so we need a lock of some
> sort?

No, the whole code is reentrant I think, since it works under DOS. The
problem is related to I/O privilege levels: the timer thread hasn't got
enough privileges to do raw I/O call.

It looks like threads created with the POSIX pthread_create() call don't
inherit I/O privileges from their parent process. Yet quoted from the iopl()
man page: "Permissions are inherited by fork and exec."

If you comment out line 180 in src/linux/lsystem.c and put an 'iopl(3)' call
line 70 in src/unix/uptimer.c, all works nicely (that's of course not a
recommended fix ;-)

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/