Opened 16 years ago

Last modified 11 years ago

#260 new defect

IZ1716: errorprone: pthread_once() should not need be run before GET_SPECIFIC()

Reported by: andreas Owned by:
Priority: normal Milestone:
Component: sge Version: 6.0
Severity: Keywords: cleanup


[Imported from gridengine issuezilla]

        Issue #:      1716             Platform:     All      Reporter: andreas (andreas)
       Component:     gridengine          OS:        All
     Subcomponent:    cleanup          Version:      6.0         CC:    None defined
        Status:       NEW              Priority:     P3
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    ernst (ernst)
      QA Contact:     ernst
       * Summary:     errorprone: pthread_once() should not need be run before GET_SPECIFIC()
   Status whiteboard:

     Issue 1716 blocks:
   Votes for issue 1716:

   Opened: Fri Jul 15 09:24:00 -0700 2005 

Components which utilize per-thread global variables typically require
pthread_once() be run prior GET_SPECIFIC() macro is used. Right now
GET_SPECIIC macro does
(1) if pthread_getspecific() fails for the key memory is allocated and
initialized and registered using pthread_set_specific().
(2) if pthread_getspecific() succeeds the memory is simply used

It is possible to overcome the need of explicitely using pthread_once() for
running a function that does the actual pthread_key_create() ... by moving the
pthread_once() into the the GET_SPECIFIC() macro wher it is run in case
pthread_getspecific() fails.

Change History (0)

Note: See TracTickets for help on using tickets.