Remember me

Lost Password?

Register now!


Who's Online
75 user(s) are online (60 user(s) are browsing Forums)

Members: 0
Guests: 75


Support us!


Report message:*

Re: Is Forbid() needed for SetMethod()?

Subject: Re: Is Forbid() needed for SetMethod()?
by Daytona675x on 2019/4/9 7:57:55

I just checked the OS4 source and SetMethod contains a Forbid/Permit pair. So you are not required to set them yourself. And as Severin said:
do not use them unless absolutly required

I don't think it's needed, after all it only changes a pointer to another function

The pointer change itself is not necessarily an atomic operation and there's other stuff going on too, namely changing the interface's flags and the recalculation of the lib's checksum, so all in all some locking mechanism is needed. If it had to be the fat Forbid/Permit instead of a more lightweight mutex, don't know, I'm not deep enough into this to know about all implications here.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project