C (109/207)

From:Rod Schnell
Date:14 Dec 99 at 20:04:14
Subject:Re: Multithreading + gfx cards

From: Rod Schnell <rodsch@telusplanet.net>

Hello Ilkka

On 13-Dec-99, Ilkka Lehtoranta wrote:
> From: Ilkka Lehtoranta <iti@solutions.fi>
>
> Hello Allan
>
> On 13-Jou-99, you wrote:
>
>>> I had trouble just with "Text" functions writing to the maintask's
>>> rastport. It crashed randomly, at the finish, I simply used
>>> my sub task to fill a buffer with the ascii then Signal() the main
>>> task to render it...
>>
>> This sounds weird. Few OS structures contain e.g. a message port, and is
>> therefor bound to a certain task - but everybody can render to a
>> rastport, so I'm quite sure something else was wrong with your program.
>
> AFAIR you have to duplicate a rastport if you are renderining to the
> rastport
> from other processes... Although I couldn't verify this from autodocs or
> RKM I recall this is mentioned somewhere in RKM (???)...
>

Sounds like ObtainGIRPort() docs regarding gadgets...

struct RastPort *ObtainGIRPort( struct GadgetInfo * );

FUNCTION
Sets up a RastPort for use (only) by custom gadget hook routines.
This function must be called EACH time a hook routine needing
to perform gadget rendering is called, and must be accompanied
by a corresponding call to ReleaseGIRPort().

Note that if a hook function passes you a RastPort pointer,
e.g., GM_RENDER, you needn't call ObtainGIRPort() in that case.

Regards Rod