9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] procdata() question?
@ 2010-02-09 13:51 Venkatesh Srinivas
  2010-02-09 15:22 ` erik quanstrom
  2010-02-09 18:49 ` Russ Cox
  0 siblings, 2 replies; 3+ messages in thread
From: Venkatesh Srinivas @ 2010-02-09 13:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

If I'm writing a library and I'd like to use procdata, is there any
way to safely do so, considering that applications using the library
might be using procdata as well? Perhaps it should take a key, like
pthread_getspecific/_setspecific?

Thanks,
-- vs



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

* Re: [9fans] procdata() question?
  2010-02-09 13:51 [9fans] procdata() question? Venkatesh Srinivas
@ 2010-02-09 15:22 ` erik quanstrom
  2010-02-09 18:49 ` Russ Cox
  1 sibling, 0 replies; 3+ messages in thread
From: erik quanstrom @ 2010-02-09 15:22 UTC (permalink / raw)
  To: 9fans

> If I'm writing a library and I'd like to use procdata, is there any
> way to safely do so, considering that applications using the library
> might be using procdata as well? Perhaps it should take a key, like
> pthread_getspecific/_setspecific?

since procdata(2) it is unused,
	cd /sys/src && grep -l procdata `{find|grep '\.[ch]'}
	./libthread/id.c

a first cut would be to add this to
the man page

	.SH BUGS
	steals
	.IR procdata (2).

but i would consider it a warning flag that
there are no current users of threadata or procdata.

- erik



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

* Re: [9fans] procdata() question?
  2010-02-09 13:51 [9fans] procdata() question? Venkatesh Srinivas
  2010-02-09 15:22 ` erik quanstrom
@ 2010-02-09 18:49 ` Russ Cox
  1 sibling, 0 replies; 3+ messages in thread
From: Russ Cox @ 2010-02-09 18:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Don't use procdata directly; use privalloc.

Russ


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

end of thread, other threads:[~2010-02-09 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-09 13:51 [9fans] procdata() question? Venkatesh Srinivas
2010-02-09 15:22 ` erik quanstrom
2010-02-09 18:49 ` Russ Cox

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