Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
60 user(s) are online (49 user(s) are browsing Forums)

Members: 0
Guests: 60

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

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

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

@all
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:
Quote:
do not use them unless absolutly required


@LiveForIt
Quote:
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