[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Multi-threading on MiNT OS ?
> I would want to establish severals threads in a code through
> "shel_write(SHW_THR_CREATE, ...)" function from MagiC.
> This function does it work with MiNT ?
This is a specifically Magic-AES function, so the answer is no.
> If not, can you suggest me another method for manage threads ?
AFAIK the Magic-AES implements the mintlib function tfork() and sells it as
shel_write(SHW_THR_CREATE). So strictly speaking it is not a thread, but
rather a separate process. In MiNT it would not share file handles with the
parent, eventhough it will share most of the user memory.
The tfork() is a combination of Pexec(7) and Pexec(104). You can implement
this yourself inside your program, but you have to make sure that the
AES/VDI arrays for all the processes your program creates are separated.
Otherwise you'll run into problems once you try to do appl_init() inside the
Konrad M.Kokoszkiewicz, http://draco.atari.org
** Ea natura multitudinis est, aut seruit humiliter, aut superbe dominatur.
** Taka to juz natura pospólstwa, albo sluzalczo sie plaszczy,
** albo bezczelnie sie panoszy. (T. Liuius XXIV, 25).