Print this page
3849 implement __cxa_atexit/__cxa_finalize

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/inc/thr_uberdata.h
          +++ new/usr/src/lib/libc/inc/thr_uberdata.h
↓ open down ↓ 824 lines elided ↑ open up ↑
 825  825  } bucket32_t;
 826  826  #endif  /* _SYSCALL32 */
 827  827  
 828  828  #define NBUCKETS        10      /* sizes ranging from 64 to 32768 */
 829  829  
 830  830  
 831  831  /*
 832  832   * atexit() data structures.
 833  833   * See port/gen/atexit.c for details.
 834  834   */
 835      -typedef void (*_exithdlr_func_t) (void);
      835 +typedef void (*_exithdlr_func_t) (void*);
 836  836  
 837  837  typedef struct _exthdlr {
 838  838          struct _exthdlr         *next;  /* next in handler list */
 839  839          _exithdlr_func_t        hdlr;   /* handler itself */
      840 +        void                    *arg;   /* argument to handler */
      841 +        void                    *dso;   /* DSO associated with handler */
 840  842  } _exthdlr_t;
 841  843  
 842  844  typedef struct {
 843  845          mutex_t         exitfns_lock;
 844  846          _exthdlr_t      *head;
      847 +        /*
      848 +         * exit_frame_monitor is part of a private contract between libc and
      849 +         * the Sun C++ runtime.
      850 +         *
      851 +         * It should be NULL until exit() is called, and thereafter hold the
      852 +         * frame pointer of the function implementing our exit processing.
      853 +         */
 845  854          void            *exit_frame_monitor;
 846  855          char            exit_pad[64 -   /* pad out to 64 bytes */
 847  856                  (sizeof (mutex_t) + sizeof (_exthdlr_t *) + sizeof (void *))];
 848  857  } atexit_root_t;
 849  858  
 850  859  #ifdef _SYSCALL32
 851  860  typedef struct {
 852  861          mutex_t         exitfns_lock;
 853  862          caddr32_t       head;
 854  863          caddr32_t       exit_frame_monitor;
↓ open down ↓ 615 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX