[M3devel] enable/disableswitching around external calls?

Tony Hosking hosking at cs.purdue.edu
Mon Dec 27 18:22:28 CET 2010


No way!
I don't understand your problem.  Are you saying you have thread-unsafe C code?
What is the problem.
Please don't do damage here!


On Dec 27, 2010, at 5:35 AM, Jay K wrote:

> I noticed calls to free in M3toC missing Enable/DisableSwitching.
> 
> I'm going to generalize this, somewhat, in m3core.h, but that still leaves a fair number of custom wrappers.
> 
> This area seems extremely error prone and extremely difficult to get test coverage on.
> 
> These functions only do anything for user threads.
>   Which we only use by default on OpenBSD.
> 
> How about the frontend emit the calls around any external calls?
> 
> Theory being: external calls are rare?
> 
> Perhaps frontend/m3middle would know if user threads are in use and only emit the calls in that case. Perhaps.
> I don't like sprinking much target-specific information around.
> 
>  - Jay
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101227/e691848b/attachment-0002.html>


More information about the M3devel mailing list