9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] libthread API
@ 2010-01-08  9:40 anonymous
  2010-01-09  4:29 ` Gorka Guardiola
  2010-01-09  4:52 ` cinap_lenrek
  0 siblings, 2 replies; 7+ messages in thread
From: anonymous @ 2010-01-08  9:40 UTC (permalink / raw)
  To: 9fans

Why libthread has threadcreate instead of something like fork? With
threadcreate you should make struct to pass more than one argument and
pass a pointer to it.

I also see no problem with recieving different values for each thread.
Memory is shared, but return value is stored in register (accumulator
register for x86) which is not shared.

Maybe it was made for compatibility with Alef? In Alef it is possible
to return mulitply values, maybe they are stored in memory. But there
is rfork with RFMEM flag and it has no problem.

And by the way when libthread should be used and when rfork(RFMEM) is
better?




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

end of thread, other threads:[~2010-01-09  5:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-08  9:40 [9fans] libthread API anonymous
2010-01-09  4:29 ` Gorka Guardiola
2010-01-09  4:33   ` erik quanstrom
2010-01-09  4:52 ` cinap_lenrek
2010-01-09  5:33   ` anonymous
2010-01-09  5:50     ` cinap_lenrek
2010-01-09  5:55       ` Bruce Ellis

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