[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [MiNT] Calling GEM from within a signal handler



> > Let the signal handler set a flag and poll that with AES timer events.
> > Alternatively, let the signal handler create a new thread using Pexec 104,
> > and then that thread can send an AES message to the original thread.
> 
> Let me explain a little of what I am trying to achieve. I have a program
> which will do some lengthy processing, but I want the user interface to
> respond even while the lengthy process is taking place.

This cannot be done with signal handler, because when signal handler runs,
the process, that installed the handler, is suspended.

The correct way is to fork (using P_fork()) the main process. However, the
child created this way cannot use GEM calls with most of GEM libraries,
just because, if an application forks, the AES global array et consortes
cannot be located in the DATA and BSS segment and this is what most libs
do.

The solution is to create a special GEM library that can cope with it. I
am currently working on such a lib for my private purposes, and, althought
the lib I am working on is in assembler, it shouldn't be difficult to
convert it to a C lib when it gets completed.

--
Konrad M.Kokoszkiewicz
|mail: draco@mi.com.pl                  | Atari Falcon030/TT030/65XE |
|http://www.obta.uw.edu.pl/~draco/
|http://draco.atari.org

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.