summaryrefslogtreecommitdiff
path: root/ACE/tests/Priority_Task_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/Priority_Task_Test.cpp')
-rw-r--r--ACE/tests/Priority_Task_Test.cpp69
1 files changed, 34 insertions, 35 deletions
diff --git a/ACE/tests/Priority_Task_Test.cpp b/ACE/tests/Priority_Task_Test.cpp
index 45f9f41e6ae..99b028e35f5 100644
--- a/ACE/tests/Priority_Task_Test.cpp
+++ b/ACE/tests/Priority_Task_Test.cpp
@@ -1,22 +1,19 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// tests
-//
-// = FILENAME
-// Priority_Task_Test.cpp
-//
-// = DESCRIPTION
-// This is a simple test to illustrate the priority mechanism of
-// ACE Tasks. The test requires no options, but the -d option
-// enables LM_DEBUG output.
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@cs.wustl.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Priority_Task_Test.cpp
+ *
+ * $Id$
+ *
+ * This is a simple test to illustrate the priority mechanism of
+ * ACE Tasks. The test requires no options, but the -d option
+ * enables LM_DEBUG output.
+ *
+ *
+ * @author Carlos O'Ryan <coryan@cs.wustl.edu>
+ */
+//=============================================================================
+
#include "test_config.h"
#include "ace/Task.h"
@@ -24,36 +21,38 @@
#include "ace/OS_NS_errno.h"
#include "ace/OS_NS_string.h"
-ACE_RCSID(tests, Priority_Task_Test, "$Id$")
-
static const ACE_TCHAR *usage = ACE_TEXT ("usage: %s [-d]\n");
#if defined (ACE_HAS_THREADS)
+/**
+ * @class Priority_Task
+ *
+ * @brief A simple Task that runs itself a different priorities.
+ *
+ * This task uses the void* argument on open to run the svc()
+ * method at a different priority. The point is execise the thread
+ * priority features of ACE.
+ */
class Priority_Task : public ACE_Task<ACE_MT_SYNCH>
{
- // = TITLE
- // A simple Task that runs itself a different priorities.
- //
- // = DESCRIPTION
- // This task uses the void* argument on open to run the svc()
- // method at a different priority. The point is execise the thread
- // priority features of ACE.
public:
+ /// The constructor
Priority_Task (void);
- // The constructor
//FUZZ: disable check_for_lack_ACE_OS
+ /**
+ * Receives the priority and run svc() on a separate thread at that
+ * priority.
+ *FUZZ: enable check_for_lack_ACE_OS
+ */
int open (void *);
- // Receives the priority and run svc() on a separate thread at that
- // priority.
- //FUZZ: enable check_for_lack_ACE_OS
+ /// Runs on a separate thread an checks the priority.
int svc (void);
- // Runs on a separate thread an checks the priority.
+ /// Returns 1 if priority was set properly, 0 otherwise.
int succeeded (void) { return error_ == 0; }
- // Returns 1 if priority was set properly, 0 otherwise.
private:
int priority_;
@@ -102,7 +101,7 @@ Priority_Task::open (void *arg)
flags,
fallback_priority,
THR_NEW_LWP,
- errno,
+ ACE_ERRNO_GET,
ACE_TEXT ("")));
flags = THR_NEW_LWP;