os_resource.h File Reference

#include "ace/config-lite.h"
#include "ace/os_include/sys/os_time.h"
#include "ace/os_include/sys/os_types.h"

Include dependency graph for os_resource.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef int ACE_Rusage

Functions

int getrusage (int who, struct rusage *rusage)


Detailed Description

definitions for XSI resource operations

Id
os_resource.h 81697 2008-05-14 18:33:11Z johnnyw

Author:
Don Hinton <dhinton@dresystems.com>

This code was originally in various places including ace/OS.h.

Definition in file os_resource.h.


Typedef Documentation

typedef int ACE_Rusage

Definition at line 85 of file os_resource.h.


Function Documentation

int getrusage ( int  who,
struct rusage *  rusage 
)

Definition at line 30 of file OS_NS_sys_resource.inl.

References ACE_ADAPT_RETVAL, ACE_NOTSUP_RETURN, ACE_OS_TRACE, and ACE_OS::getrusage().

00031 {
00032   ACE_OS_TRACE ("ACE_OS::getrusage");
00033 
00034 #if defined (ACE_HAS_GETRUSAGE)
00035 # if defined (ACE_WIN32)
00036   ACE_UNUSED_ARG (who);
00037 
00038 #  if defined (ACE_LACKS_GETPROCESSTIMES)
00039   ACE_UNUSED_ARG (ru);
00040   ACE_NOTSUP_RETURN (-1);
00041 #  else
00042   FILETIME dummy_1;
00043   FILETIME dummy_2;
00044   ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetProcessTimes (::GetCurrentProcess(),
00045                                                              &dummy_1,   // start
00046                                                              &dummy_2,     // exited
00047                                                              &ru->ru_stime,
00048                                                              &ru->ru_utime),
00049                                           ace_result_),
00050                         int, -1);
00051 #  endif /* ACE_LACKS_WIN32_GETPROCESSTIMES */
00052 # else
00053 #   if defined (ACE_HAS_RUSAGE_WHO_ENUM)
00054   ACE_OSCALL_RETURN (::getrusage ((ACE_HAS_RUSAGE_WHO_ENUM) who, ru), int, -1);
00055 #   else
00056   ACE_OSCALL_RETURN (::getrusage (who, ru), int, -1);
00057 #   endif /* ACE_HAS_RUSAGE_WHO_ENUM */
00058 # endif /* ACE_WIN32 */
00059 #else
00060   ACE_UNUSED_ARG (who);
00061   ACE_UNUSED_ARG (ru);
00062   ACE_NOTSUP_RETURN (-1);
00063 #endif /* ACE_HAS_GETRUSAGE */
00064 }


Generated on Tue Feb 2 17:31:13 2010 for ACE by  doxygen 1.4.7