Re: [cc65] atexit() destructor priority

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-01-27 22:11:05
Hi!

On Thu, Jan 27, 2011 at 03:42:48PM +0100, Oliver Schmidt wrote:
> Here you go:

Ok, here is the same information ordered by priority:

-------------------------------------------------------------------------

Constructors:

30 initcurunit          cbm
27 initmouse            atari
26 detect               atari
25 initmainargs         atari
25 initstkchk           runtime
24 __getdefdev          atari
24 initheap             common
24 initmainargs         atmos, c16, c128, c64, cbm510, cbm610, geos, lynx,
                        pet, plus4, vic20
19 initdostype          apple2
18 initmainargs         apple2
17 raisefilelevel       apple2
16 initconio            apple2
 7 initsystime          c128, c64
 7 cwd_init             common
 7 env_init             common
 7 initcgetc            atmos, c128
 7 initkbd              c16, plus4
 7 initstdin            cbm
 7 initstdout           cbm
 7 initostype           apple2
 7 initprompt           apple2
 7 initreboot           apple2
 7 initiobuf            apple2
 7 initscrsize          geos
 7 conioinit            nes



Destructors:

17      closeallfiles   apple2, atari, cbm
 7      _reset_brk      apple2, atari, c16, c128, c64, pet, vic20
 7      donecgetc       c128
 7      donekbd         c16, plus4
 7      setsyscursor    cbm610
 5      doatexit        common

-------------------------------------------------------------------------

7 is the default priority, which explains why there are so many routines with
this priority.

The constructor with priority 27 for the Atari (initmouse) will get removed in
the next days by me. It is part of an ancient mouse module with static
linkage. It cannot be used anyway, since the necessary header files are
missing. If anybody is interested in mouse support for the Atari, please
consider converting this module into a loadable driver.

Regarding the destructors: Having priorities 17 and 5 exchanged should do the
job.

For the constructors, it seems that they accumulate at the high priorities. I
can't see any necessary adjustments. Maybe removing explicit priorities where
possible.

For the nes, I will rename conioinit to initconio.

Anything else?

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jan 27 22:11:13 2011

This archive was generated by hypermail 2.1.8 : 2011-01-27 22:11:16 CET