9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] atexit() & atexitdont()
@ 2014-11-06 21:05 Oleg
  2014-11-06 21:26 ` erik quanstrom
  2014-11-07  8:19 ` Charles Forsyth
  0 siblings, 2 replies; 20+ messages in thread
From: Oleg @ 2014-11-06 21:05 UTC (permalink / raw)
  To: 9fans

  Hi, all.

I looked at atexit() and atexitdont() and i don't understand why these
functions are implemented with a static array instead of singly linked list?
May be somebody with a greater plan9 experience can help me with my question.

If i do:

#include <u.h>
#include <libc.h>

void f1(void)
{
  print("f1\n");
}

void f2(void)
{
  print("f2\n");
}

void main(int, char**)
{
  atexit(f1);
  atexit(f2);
  atexit(f1);

  atexitdont(f2);
  atexit(f2);

  exits(nil);
}

i get:

f1
f2
f1

instead of:

f1
f1
f2

because of atexit.c source code.

  Thanks.



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [9fans] atexit() & atexitdont()
@ 2014-11-07 17:45 sl
  0 siblings, 0 replies; 20+ messages in thread
From: sl @ 2014-11-07 17:45 UTC (permalink / raw)
  To: lego12239, 9fans

> How can i send a patch to 9front?

You can file an issue and link to your patch here:

	http://code.google.com/p/plan9front/issues/list

Or you can sign up for the 9front mailing list and post there:

	http://9front.org/lists.html

sl



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

end of thread, other threads:[~2014-11-07 20:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 21:05 [9fans] atexit() & atexitdont() Oleg
2014-11-06 21:26 ` erik quanstrom
2014-11-06 21:42   ` Skip Tavakkolian
2014-11-06 21:44     ` Skip Tavakkolian
2014-11-06 22:50       ` lego12239
2014-11-06 22:45   ` Oleg
2014-11-07  7:17   ` k0ga
2014-11-07  8:02     ` Oleg
2014-11-07  8:19 ` Charles Forsyth
2014-11-07  9:44   ` Oleg
2014-11-07 10:22     ` Charles Forsyth
2014-11-07 11:05       ` Oleg
2014-11-07 10:57     ` Steffen Nurpmeso
2014-11-07 11:49       ` Charles Forsyth
2014-11-07 12:19         ` Oleg
2014-11-07 12:27           ` Charles Forsyth
2014-11-07 19:53             ` erik quanstrom
2014-11-07 20:30               ` Oleg
2014-11-07 19:25         ` Steffen Nurpmeso
2014-11-07 17:45 sl

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