Is libInit() protected from switching i.e not running multitask?

This forum is for general developer support questions.
Post Reply
User avatar
gdridi
Posts: 98
Joined: Sat Aug 11, 2012 11:17 am
Contact:

Is libInit() protected from switching i.e not running multitask?

Post by gdridi »

Hello!

I see difference between running my library between AOS4.1FinalEditionUpdate0 and AOS4.1FEUpdate2

Is there a Forbid() done by the Kernel when libInit() is called to initialize library code ? That was removed in AOS4.1FinalEditionUpdate2 ?

This leads to instability when launching multiple instances of my library at the same time. So libInit() must be protected by a Forbid().

This could explain mysterious bug ?
When launching multiple instances of program in parallel that use a same library.

Sincerely yours,

DGILLES
Olaf Barthel
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 10
Joined: Mon Jun 20, 2011 4:22 pm

Re: Is libInit() protected from switching i.e not running multitask?

Post by Olaf Barthel »

gdridi wrote: Wed Oct 30, 2024 4:38 pm Hello!

I see difference between running my library between AOS4.1FinalEditionUpdate0 and AOS4.1FEUpdate2

Is there a Forbid() done by the Kernel when libInit() is called to initialize library code ? That was removed in AOS4.1FinalEditionUpdate2 ?

This leads to instability when launching multiple instances of my library at the same time. So libInit() must be protected by a Forbid().

This could explain mysterious bug ?
When launching multiple instances of program in parallel that use a same library.

Sincerely yours,

DGILLES
For disk-loaded libraries and devices, the init code is invoked by the ramlib process, which loads the respective executable file from disk, searches for a resident tag and the relevant setup information. Because the ramlib process performs this task one library and device at a time, there is no Forbid() locking involved. The device/library init code is invoked by ramlib, and it ought to return a pointer to the library/device base, if successful, or NULL if unsuccessful. Arbitration with Forbid()/Permit() locking is used only with the open, close and expunge functions.
Post Reply