author | alanb |
Thu, 21 Mar 2019 08:41:10 +0000 | |
branch | niosocketimpl-branch |
changeset 57275 | 222fa5ed1c91 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
34647 | 1 |
/* |
39298 | 2 |
* Copyright (c) 2012, 2016 SAP SE. All rights reserved. |
34647 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
39298 | 25 |
// Class libo4 is a C++ wrapper around the libo4 porting library. It handles |
26 |
// basic stuff like dynamic loading, library initialization etc. |
|
27 |
// The libo4 porting library is a set of functions that bridge from the AIX |
|
28 |
// runtime environment on OS/400 (aka PASE layer) into native OS/400 |
|
29 |
// functionality (aka ILE layer) to close some functional gaps that exist in |
|
30 |
// the PASE layer. |
|
34647 | 31 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
47216
diff
changeset
|
32 |
#ifndef OS_AIX_LIBO4_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
47216
diff
changeset
|
33 |
#define OS_AIX_LIBO4_HPP |
34647 | 34 |
|
35 |
class libo4 { |
|
36 |
public: |
|
37 |
// Initialize the libo4 porting library. |
|
38 |
// Returns true if succeeded, false if error. |
|
39 |
static bool init(); |
|
40 |
||
39298 | 41 |
// Triggers cleanup of the libo4 porting library. |
34647 | 42 |
static void cleanup(); |
43 |
||
39298 | 44 |
// Returns a number of memory statistics from OS/400. |
45 |
// |
|
46 |
// See libo4.h for details on this API. |
|
34647 | 47 |
// |
48 |
// Specify NULL for numbers you are not interested in. |
|
49 |
// |
|
39298 | 50 |
// Returns false if an error happened. Activate OsMisc trace for |
34647 | 51 |
// trace output. |
52 |
// |
|
39298 | 53 |
static bool get_memory_info(unsigned long long* p_virt_total, |
54 |
unsigned long long* p_real_total, |
|
55 |
unsigned long long* p_real_free, |
|
56 |
unsigned long long* p_pgsp_total, |
|
57 |
unsigned long long* p_pgsp_free); |
|
34647 | 58 |
|
39298 | 59 |
// Returns information about system load |
34647 | 60 |
// (similar to "loadavg()" under other Unices) |
61 |
// |
|
39298 | 62 |
// See libo4.h for details on this API. |
63 |
// |
|
34647 | 64 |
// Specify NULL for numbers you are not interested in. |
65 |
// |
|
39298 | 66 |
// Returns false if an error happened. Activate OsMisc trace for |
34647 | 67 |
// trace output. |
68 |
// |
|
39298 | 69 |
static bool get_load_avg(double* p_avg1, double* p_avg5, double* p_avg15); |
34647 | 70 |
|
39298 | 71 |
// This is a replacement for the "realpath()" API which does not really work |
72 |
// in PASE together with the (case insensitive but case preserving) |
|
73 |
// filesystem on OS/400. |
|
34647 | 74 |
// |
39298 | 75 |
// See libo4.h for details on this API. |
34647 | 76 |
// |
39298 | 77 |
// Returns false if an error happened. Activate OsMisc trace for |
34647 | 78 |
// trace output. |
79 |
// |
|
39298 | 80 |
static bool realpath(const char* file_name, char* resolved_name, |
81 |
int resolved_name_len); |
|
34647 | 82 |
|
39298 | 83 |
// Call libo4_RemoveEscapeMessageFromJoblogByContext API to remove messages |
84 |
// from the OS/400 job log. |
|
85 |
// |
|
86 |
// See libo4.h for details on this API. |
|
87 |
static bool removeEscapeMessageFromJoblogByContext(const void* context); |
|
34647 | 88 |
}; |
89 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
47216
diff
changeset
|
90 |
#endif // OS_AIX_LIBO4_HPP |