CVS log for pegasus/src/Pegasus/Common/Attic/ThreadUnix_inline.h

(logo)

Help

(back) Up to [Pegasus] / pegasus / src / Pegasus / Common

Request diff between arbitrary revisions


Default branch: MAIN
Bookmark a link to: HEAD / (download)
Current tag: PRE_LICENSE_UPDATE_2003

Revision 1.12 / (view) - annotate - [select for diffs] , Wed Aug 6 12:58:15 2003 UTC (20 years, 11 months ago) by keith.petley
Branch: MAIN
CVS Tags: test, TEST, RELEASE_2_3_0-msg-freeze, PRE_LICENSE_UPDATE_2003
Changes since 1.11: +30 -0 lines
Diff to previous 1.11
 - The Solaris compiler moans that pthread_create is expecting a function with
   "C" linkage as the third parameter and we are passing one with "C++" linkage.
   Not only is this true it appears the compiler is correct to complain, even
   though "C" and "C++" linkage are the same on Solaris.

   Added a structure zosParmDef to hold the desired function and its parameter.
   The pass a wrapper function with "C" linkage to pthread_create that simply
   calls the function in zosParmDef with the included parameter.

   Note the structure is malloc'ed in Thread::run, but _must_ be free'd by the
   newly created thread. This is may not be pretty, but it does avoid some nasty
   race conditions.

   zosParmDef shamelessly "borrowed" from the IBM zOS port.

 - On Solaris 5.8 the IPC test (and some others) would deadlock with the
   process consuming large amounts of CPU time. It turns out the "dqe" thread
   in the IPC test has a "hard" loop checking for messages on the queue. If
   the main thread and one of the dqe threads ended up on the same LWP process
   then the dqe would spin and never get pre-empted. This locked out the main
   thread which never got a chance to stop the dqe thread.

   Changed the scheduling policy from SCHED_OTHER to SCHED_RR for Solaris. This
   seems to fix the IPC deadlock by pre-empting dqe after a set time.

 - All the above wrapped in an #ifdef SOLARIS so it doesn't affect other
   platforms.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Diffs between and
Type of Diff should be a

View only Branch:
Sort log by:

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2