-
Notifications
You must be signed in to change notification settings - Fork 0
Description
| Field | Value |
|---|---|
| Bugzilla ID | 1492 |
| Reporter | crodrigu |
| Assigned to | DOC Center Support List (internal) |
| Product | ACE |
| Component | ACE Core |
| Version | 5.3.1 |
| Platform / OS | All / All |
| Priority | P3 |
| Severity | normal |
| Status | ASSIGNED |
| Resolution | |
| Created | 2003-04-10 16:27:25 -0500 |
Originally posted by crodrigu on 2003-04-10 16:27:26 -0500
In TAO 1.3's RT-CORBA, ACE_SCHED_* and THR_SCHED_* macros seemed to be used
inconsistently many places. These macros did not seem to be used properly or
consistently in TAO 1.3, most likely because they did not seem to be properly
documented, in ACE.
This lack of proper documentation makes it very difficult for newcomers
to figure out how to successfully set thread priorities using ACE.
Here is one of my earlier e-mails to the devo_group:
================================================================================
Date: Fri, 7 Feb 2003 11:04:07 -0500
From: Craig Rodrigues crodrigu@bbn.com
To: devo_group@cse.wustl.edu
Subject: [devo_group] Values of THR_SCHED_* macros?
Hi,
TAO VERSION: 1.3
ACE VERSION: 5.3
HOST MACHINE and OPERATING SYSTEM:
Red Hat Linux release 7.1 (Seawolf)
COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
CONTENTS OF $ACE_ROOT/ace/config.h:
#include "ace/config-linux.h"
SYNOPSIS:
Why are THR_SCHED_* macros defined to certain values on Linux
that are not the same as ACE_SCHED*
I wrote a program that includes some ACE header files and then prints
the values of some of the SCHED macros in ACE:
SCHED_OTHER: 0 SCHED_FIFO: 1 SCHED_RR 2
ACE_SCHED_OTHER 0 ACE_SCHED_FIFO 1 ACE_SCHED_RR 2
THR_SCHED_DEFAULT 524288 THR_SCHED_FIFO 131072 THR_SCHED_RR 262144
Why are the THR_* versions of these macros different than the
ACE* versions of these macros? If the THR_* values are passed
in the policy parameter of pthread_setschedparam(), then the call
will fail. RTCORBA stores the THR_* values of these macros
internally, so this explains some of the RTCORBA failures I am seeing
related to thread priorities.
If I examine the preprocessor output of my program by adding
-save-temps to gcc, here is what my program looks like:
printf("SCHED_OTHER: %u SCHED_FIFO: %u SCHED_RR %u\n", 0, 1, 2);
printf("ACE_SCHED_OTHER %u ACE_SCHED_FIFO %u ACE_SCHED_RR %u\n", 0, 1, 2);
printf("THR_SCHED_DEFAULT %u THR_SCHED_FIFO %u THR_SCHED_RR %u\n",
0x00080000, 0x
00020000, 0x00040000);
What's going on here?
This is one of Bala's replies:
================================================================================
From: Balachandran Natarajan bala@cse.wustl.edu
Subject: Re: [devo_group] Values of THR_SCHED_* macros?
To: crodrigu@bbn.com (Craig Rodrigues)
Date: Fri, 7 Feb 2003 10:11:34 -0600 (CST)
I too observed this last evening when I was working with Otis here. I think its
too late to fix it for the upcoming BFO release. I was going to add a bugzilla
entry for it. Now that you have sent a PRF, I am going to stick this in. This
is too maddening.
================================================================================
And this is one of Doug's follow-up replies:
===================================================================================
To: Craig Rodrigues crodrigu@bbn.com
cc: devo_group@cse.wustl.edu
Subject: Re: [devo_group] Values of THR_SCHED_* macros?
In-reply-to: Your message of "Fri, 07 Feb 2003 11:23:40 EST."
20030207162340.GA19099@bbn.com
Date: Fri, 07 Feb 2003 12:01:00 -0600
From: "Douglas C. Schmidt" schmidt@cse.wustl.edu
i Craig,
Yes. I am going to reiterate what I said in a previous e-mail:
undocumented macros in ACE are very annoying, and in this case are a
source of problems which is actually preventing me from doing other
work. This situation needs to be changed moving forward.
I definitely agree. We need some volunteers to improve this situation.
Take care,
Doug
===================================================================================