caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] C callbacks and threading...
@ 2001-09-27  9:34 Chris Quinn
  2001-09-27 13:20 ` Xavier Leroy
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Quinn @ 2001-09-27  9:34 UTC (permalink / raw)
  To: CAML LIST

Hi list,

The manual says a caml function can be registered and then used from the C runtime. Is this still true if called from a thread not created from within Caml ie. via the Thread module? I have vague recollections of caml's thread system involving some bookkeeping which probably rules this usage out.
Can anyone say?

Thanks,
Chris Q
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] C callbacks and threading...
  2001-09-27  9:34 [Caml-list] C callbacks and threading Chris Quinn
@ 2001-09-27 13:20 ` Xavier Leroy
  2001-09-27 13:49   ` [Caml-list] Mac and C-code Ward Wheeler
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Leroy @ 2001-09-27 13:20 UTC (permalink / raw)
  To: Chris Quinn; +Cc: CAML LIST

> The manual says a caml function can be registered and then used from
> the C runtime. Is this still true if called from a thread not
> created from within Caml ie. via the Thread module? I have vague
> recollections of caml's thread system involving some bookkeeping
> which probably rules this usage out.

It should work if:
- the Caml code doesn't use threads itself;
- you call it via callback_exn rather than callback (to make sure you
  always get control back from the Caml code);
- you protect the call to callback_exn by a mutex, to make sure that
  no two threads can call into Caml simultaneously.

In all other cases, and especially if the Caml code is multithreaded,
you would probably break something in the Caml runtime system.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Caml-list] Mac and C-code
  2001-09-27 13:20 ` Xavier Leroy
@ 2001-09-27 13:49   ` Ward Wheeler
  0 siblings, 0 replies; 9+ messages in thread
From: Ward Wheeler @ 2001-09-27 13:49 UTC (permalink / raw)
  To: CAML LIST

I am trying to port an Ocaml application to Mac PPC and have C-code that is 
linked in.  I can do this under LINUX and Win2k usinf gc and MS VC++.  Does 
anyone have experience with this on Macs?
Thanks
Ward Wheeler

*********************************
Ward Wheeler
Division of Invertebrate Zoology
American Museum of Natural History
Central Park West @ 79th St.
New York, NY 10024-5192
1-212-769-5754 (Voice)
1-212-769-5277 (FAX)
*********************************

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Mac and C-code
  2001-10-05 18:28 ` Jeff Henrikson
@ 2001-10-07 10:40   ` Sven
  0 siblings, 0 replies; 9+ messages in thread
From: Sven @ 2001-10-07 10:40 UTC (permalink / raw)
  To: Jeff Henrikson; +Cc: Damien Doligez, wheeler, caml-list

On Fri, Oct 05, 2001 at 02:28:01PM -0400, Jeff Henrikson wrote:
> > You'll have no problems porting the command-line tool from Linux to
> > Mac OS X: both are Unix.  Mac OS 9 would be a lot harder.
> >
> > As for the Tcl/Tk interface, you'll have to wait for a port of Tcl/Tk
> > for Mac OS X.  I don't think there is one yet.
> 
> I think GTK for OS X exists though, so you could consider redoing your GUI in lablgtk if it isn't too complex.  lablgtk is a nice API.

But it needs an X server still, i think. These can be had for OS X from
various providers. 

Friendly,

Sven Luther
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:  [Caml-list] Mac and C-code
  2001-10-05 12:06 Damien Doligez
  2001-10-05 18:28 ` Jeff Henrikson
@ 2001-10-06 22:56 ` Jacques Garrigue
  1 sibling, 0 replies; 9+ messages in thread
From: Jacques Garrigue @ 2001-10-06 22:56 UTC (permalink / raw)
  To: caml-list, wheeler

From: Damien Doligez <damien.doligez@inria.fr>
> >From: Ward Wheeler <wheeler@amnh.org>
> 
> >         I was going to blow off Mac OS 9 and move on to OS X 
> >directly.  But I know little about this Mac stuff.  The program is command 
> >line driven, but I have an external Tcl/Tk interface for it.
> 
> You'll have no problems porting the command-line tool from Linux to
> Mac OS X: both are Unix.  Mac OS 9 would be a lot harder.
> 
> As for the Tcl/Tk interface, you'll have to wait for a port of Tcl/Tk
> for Mac OS X.  I don't think there is one yet.

If you've got a bit of Unix experience, then you can install X11.
You can get a free one from http://www.mrcla.com/XonX/
Then Tcl/Tk 8.3.3 compiles out of the box, and ocaml configure script
will recognize it.

Cheers,
---------------------------------------------------------------------------
Jacques Garrigue      Kyoto University     garrigue at kurims.kyoto-u.ac.jp
		<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [Caml-list] Mac and C-code
  2001-10-05 12:06 Damien Doligez
@ 2001-10-05 18:28 ` Jeff Henrikson
  2001-10-07 10:40   ` Sven
  2001-10-06 22:56 ` Jacques Garrigue
  1 sibling, 1 reply; 9+ messages in thread
From: Jeff Henrikson @ 2001-10-05 18:28 UTC (permalink / raw)
  To: Damien Doligez, wheeler; +Cc: caml-list

> You'll have no problems porting the command-line tool from Linux to
> Mac OS X: both are Unix.  Mac OS 9 would be a lot harder.
>
> As for the Tcl/Tk interface, you'll have to wait for a port of Tcl/Tk
> for Mac OS X.  I don't think there is one yet.

I think GTK for OS X exists though, so you could consider redoing your GUI in lablgtk if it isn't too complex.  lablgtk is a nice
API.

I'm still wishing they had finished GTK for OS 9.

>1. Are you porting to Mac OS 9 or Mac OS X ?

Does anybody have a good way to do builds on Mac OS 9?  Even ocaml's own build seems hairy.  Among other problems, the "domake"
script seems to cause everything to be rebuilt from scratch every time.  As a MPW newbie, the MPW tools just seem too bizzare to
me.  I don't want to learn another sort-of-compatable make program.  People writing both GNU make and MS nmake confuse me enough
already.

Has anybody tried "jam" "ftjam" or some other mac compatable make-like tool with ocaml (and perhaps related C code) projects with
success?


Jeff Henrikson



-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:  [Caml-list] Mac and C-code
@ 2001-10-05 12:06 Damien Doligez
  2001-10-05 18:28 ` Jeff Henrikson
  2001-10-06 22:56 ` Jacques Garrigue
  0 siblings, 2 replies; 9+ messages in thread
From: Damien Doligez @ 2001-10-05 12:06 UTC (permalink / raw)
  To: Damien.Doligez, caml-list, wheeler

>From: Ward Wheeler <wheeler@amnh.org>

>         I was going to blow off Mac OS 9 and move on to OS X 
>directly.  But I know little about this Mac stuff.  The program is command 
>line driven, but I have an external Tcl/Tk interface for it.

You'll have no problems porting the command-line tool from Linux to
Mac OS X: both are Unix.  Mac OS 9 would be a lot harder.

As for the Tcl/Tk interface, you'll have to wait for a port of Tcl/Tk
for Mac OS X.  I don't think there is one yet.

-- Damien
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:  [Caml-list] Mac and C-code
  2001-09-28 14:01 Damien Doligez
@ 2001-09-29  2:52 ` Ward Wheeler
  0 siblings, 0 replies; 9+ messages in thread
From: Ward Wheeler @ 2001-09-29  2:52 UTC (permalink / raw)
  To: Damien Doligez, caml-list


> >I am trying to port an Ocaml application to Mac PPC and have C-code that is
> >linked in.  I can do this under LINUX and Win2k usinf gc and MS VC++.  Does
> >anyone have experience with this on Macs?
>
>The answers are going to be completely different depending on two
>things:
>1. Are you porting to Mac OS 9 or Mac OS X ?
>2. Does your application have a graphical user interface, or is it
>    command-line driven ?

         I was going to blow off Mac OS 9 and move on to OS X 
directly.  But I know little about this Mac stuff.  The program is command 
line driven, but I have an external Tcl/Tk interface for it.
         Thanks,
Ward

>-- Damien


*********************************
Ward Wheeler
Division of Invertebrate Zoology
American Museum of Natural History
Central Park West @ 79th St.
New York, NY 10024-5192
1-212-769-5754 (Voice)
1-212-769-5277 (FAX)
*********************************

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re:  [Caml-list] Mac and C-code
@ 2001-09-28 14:01 Damien Doligez
  2001-09-29  2:52 ` Ward Wheeler
  0 siblings, 1 reply; 9+ messages in thread
From: Damien Doligez @ 2001-09-28 14:01 UTC (permalink / raw)
  To: caml-list, wheeler

>From: Ward Wheeler <wheeler@amnh.org>

>I am trying to port an Ocaml application to Mac PPC and have C-code that is 
>linked in.  I can do this under LINUX and Win2k usinf gc and MS VC++.  Does 
>anyone have experience with this on Macs?

The answers are going to be completely different depending on two
things:
1. Are you porting to Mac OS 9 or Mac OS X ?
2. Does your application have a graphical user interface, or is it
   command-line driven ?

-- Damien
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-10-07 10:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-27  9:34 [Caml-list] C callbacks and threading Chris Quinn
2001-09-27 13:20 ` Xavier Leroy
2001-09-27 13:49   ` [Caml-list] Mac and C-code Ward Wheeler
2001-09-28 14:01 Damien Doligez
2001-09-29  2:52 ` Ward Wheeler
2001-10-05 12:06 Damien Doligez
2001-10-05 18:28 ` Jeff Henrikson
2001-10-07 10:40   ` Sven
2001-10-06 22:56 ` Jacques Garrigue

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).