caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chris Hecker <checker@d6.com>
To: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk), caml-list@inria.fr
Subject: Re: [Caml-list] create a closure in external C function?
Date: Tue, 06 Mar 2001 16:44:06 -0800	[thread overview]
Message-ID: <4.3.2.7.2.20010306163224.036498f0@shell16.ba.best.com> (raw)
In-Reply-To: <slrn9aavq2.29o.qrczak@qrnik.zagroda>


>trampoline+vacall is evil. It uses a global variable; this is not
>thread safe.

Yeah, I was going to look at that closer to see if there's any way to make it thread safe.  It seems a shame to have all of that cross platform work done and then shove the thing in a global...

> Especially if you statically know types of arguments,
>which is the case I am talking about.

Which case are you talking about?  Are you working on this as well?  Are you just talking about wanting to expose qsort and other functions that take callbacks?

> I would like to have this functionality in OCaml's foreign function
>interface, without forcing to rely on an inconvenient third-party
>package.

That would be great, but I'm not sure if anybody's working on this at INRIA.  Heck, we might as well do a proof of concept first before they waste their time on it anyway, and then if it's useful we'll see about making it more official.  If it was built into the compiler it could be made super-clean, basically like external is now...I can see it now...extern[al] "C"!  <ducking and running>  

My original plan wasn't to do the whole thing, it was just to get wglGetProcAddress (and the glx version) working for OpenGL for a library Kipton Barros and I are going to be working on, and then I realized that if I got that working it wouldn't be much harder to just generalize it to GetProcAddress/dlsym, which would have the potential to be hugely useful for all caml programmers, not just OpenGL programmers.  So, I'll probably just do that, assuming it turns out to be possible.

Chris


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-03-07  0:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06  9:29 Chris Hecker
2001-03-06 10:50 ` Fabrice Le Fessant
2001-03-06 17:01 ` Xavier Leroy
2001-03-06 18:19   ` Chris Hecker
2001-03-07  3:23     ` Fergus Henderson
2001-03-06 18:58   ` Marcin 'Qrczak' Kowalczyk
2001-03-06 19:13     ` Chris Hecker
2001-03-06 21:16       ` Marcin 'Qrczak' Kowalczyk
2001-03-06 22:56         ` Chris Hecker
2001-03-07  0:22           ` Marcin 'Qrczak' Kowalczyk
2001-03-07  0:44             ` Chris Hecker [this message]
2001-03-07  8:49               ` Marcin 'Qrczak' Kowalczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20010306163224.036498f0@shell16.ba.best.com \
    --to=checker@d6.com \
    --cc=caml-list@inria.fr \
    --cc=qrczak@knm.org.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).