[m-dev.] Update library pragma C code

Thomas Charles CONWAY conway at cs.mu.OZ.AU
Mon Aug 3 10:16:45 AEST 1998


Peter Schachte, you write:
> The reason I mention this now is that I was thinking that the current
> may_call_mercury/will_not_call_mercury labeling is really a bit too limited,
> and while you're monkeying with this stuff anyway would be a good time to
> generalize it a bit more.  I think it would be better if that sort of info
> were given as a list of "tags", so that the set of possible tags could be
> expanded with the evolution of Mercury.  I'd like to propose the addition of
> may_trail/will_not_trail as the first extension.

In my uncommitted changes relating to io__fork/4 (which will become
something_else__fork/4), I've added functionality to allow a list of
attributes to be attached to c code pragmas. Eg:
	pragma c_code(foo(...), [will_not_call_mercury, threadsafe], "...").

It would be a relatively minor change to add other flags
(eg may_need_trailing) or whatever. Of course, getting the compiler to
make use of that would be a bigger task.

Thomas
-- 
Thomas Conway <conway at cs.mu.oz.au>
Nail here [] for new monitor.  )O+



More information about the developers mailing list