[vorbis-dev] Ports

Kenneth C. Arnold kcarnold at arnoldnet.net
Thu Dec 28 10:52:12 PST 2000


According to Brian Havard (sometime around Thu, Dec 28, 2000 at 07:06:07PM +1000):
> On Wed, 27 Dec 2000 11:47:41 -0500, Kenneth C. Arnold wrote:
> 
> >According to Michael Smith (sometime around Wed, Dec 27, 2000 at 01:39:16PM +1100):
> >
> >> Is using gcc a problem? (i.e. would you prefer to use watcom?) ogg123 is
> >> being largely rewritten at the moment, I suspect it'd be possible to not
> >> have it do fdopen() at all (it's a bit of a messy way to do socket stuff).
> >
> >It's a very messy way to do socket stuff, and only there to deal with
> >a library that used FILE*. It could have been a lot neater if I had
> >instead used callbacks to begin with, but the whole mess is getting a
> >big rewrite very soon. I'm currently busy with buffering; since we're
> >on the OS/2 topic, how would one go about doing a buffer for OS/2? My
> >current approach is a fixed shared memory segment and two processes
> >(could be threads on a platform that supports it).
> 
> Isn't shared memory quite tricky to do portably, even between unix
> variants? On OS/2 multithreading is the normal way to do this sort of thing

Yes, though I could on SYSV shm being fairly portable. If not, it's
just one allocate function that needs changing; all I really care
about is that a certain area of memory be shared, and that I can pass
a pointer to it. I'm trying to avoid messy things like semaphores,
instead simply storing the read and write pointers into the
buffer. There are a few race conditions here but I'm trying to work
around them.

> but threads & associated mechanisms like semaphores tend to be platform
> specific so doing it for all supported platforms becomes a pain. However,
> multi-threading, semaphores & even shared memory are all covered by APR
> which I mentioned a while ago re plugin loading. APR is the library used
> in/developed for Apache 2.0 to encapsulate all the platform specific
> details.

Maybe I can look at the APR code for ideas, but definately APR cannot
be a dependancy of any Vorbis tool -- it's too big to drag along.

So can I see some example code on how to do a multithreaded OS/2 app?
Or perhaps an OS/2 coder can look at what I have when I commit it?
(I'm hoping for the latter, because I barely remember what OS/2 _is_ <g>)


-- 
Kenneth Arnold <ken at arnoldnet.net> / kcarnold / Linux user #180115
http://arnoldnet.net/~kcarnold/



<HR NOSHADE>
<UL>
<LI>application/pgp-signature attachment: stored
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: part
Type: application/octet-stream
Size: 233 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20001228/8036edef/part-0001.obj


More information about the Vorbis-dev mailing list