chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Best way to share memory between C and Chicken


From: Dan Leslie
Subject: Re: [Chicken-users] Best way to share memory between C and Chicken
Date: Sun, 05 May 2013 10:35:26 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130221 Thunderbird/17.0.3

I'll probably write the wiki page while taking the bus to work next week, but for now I'm unaware of any issues and have a working example.

There's a test.scm file in the repo that gives a quick rundown on how to use a (non-shared) semaphore. That is to say, if you're using fork() and only wish to synchronize processes in this sub-tree then you should be good with the example in test.scm.

If you wish to synchronize unrelated processes then you'll need to use posix-shm to store the semaphores. This O'Reilly page gives a good walk through:
http://www.linuxdevcenter.com/pub/a/linux/2007/05/24/semaphores-in-linux.html?page=5

-Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]