zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
zos-bpx.h
Go to the documentation of this file.
1
2// Licensed Materials - Property of IBM
3// ZOSLIB
4// (C) Copyright IBM Corp. 2020. All Rights Reserved.
5// US Government Users Restricted Rights - Use, duplication
6// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8
9// APIs that implement some of the BPX* callable services for compilers
10// that don't currently support OS linkage (as Woz); for details, see:
11// https://www.ibm.com/docs/en/zos/2.4.0?topic=reference-callable-services-descriptions
12
13#ifndef ZOS_BPX_H_
14#define ZOS_BPX_H_
15
16#ifndef _POSIX_SOURCE
17#define _POSIX_SOURCE
18#endif
19
20#include "zos-macros.h"
21
22#include <unistd.h>
23
24typedef struct __bpxyatt {
25 char att_id[4]; /* Eye-catcher="ATT " */
26 short att_version; /* Version of this structure=3 */
27 char att_res01[2]; /* (reserved) */
28
29 /* ATTSETFLAGS1 = 1 byte */
30 unsigned int att_modechg : 1, /* X'80' 1=Change to mode indicated */
31 att_ownerchg : 1, /* X'40' 1=Change to Owner indicated */
32 att_setgen : 1, /* X'20' 1=Set General Attributes */
33 att_trunc : 1, /* X'10' 1=Truncate Size */
34 att_atimechg : 1, /* X'08' 1=Change the Atime */
35 att_atimetod : 1, /* X'04' 1=Change Atime to Cur. Time */
36 att_mtimechg : 1, /* X'02' 1=Change the Mtime */
37 att_mtimetod : 1; /* X'01' 1=Change Mtime to Cur. Time */
38
39 /* ATTSETFLAGS2 = 1 byte */
40 unsigned int att_maaudit : 1, /* X'80' 1=Modify auditor audit info */
41 att_muaudit : 1, /* X'40' 1=Modify user audit info */
42 att_ctimechg : 1, /* X'20' 1=Change the Ctime */
43 att_ctimetod : 1, /* X'10' 1=Change Ctime to Cur. Time */
44 att_reftimechg : 1, /* X'08' 1=Change the RefTime */
45 att_reftimetod : 1, /* X'04' 1=Change RefTime to Cur.Time */
46 att_filefmtchg : 1, /* X'02' 1=Change File Format */
47 att_res04 : 1; /* X'01' (reserved flag bits) */
48
49 /* ATTSETFLAGS3 = 1 byte */
50 unsigned int att_res05 : 1, /* X'80' (reserved flag bits) */
51 att_charsetidchg : 1, /* X'40' 1=Change File Tag */
52 att_lp64times : 1, /* X'20' 1=Use 64-bit time values */
53 att_seclabelchg : 1; /* X'10' 1=Change Seclabel */
54
55 char att_setflags4; /* Reserved */
56
57 int att_mode; /* File Mode */
58 int att_uid; /* User ID of the owner of the file */
59 int att_gid; /* Group ID of the Group of the file */
60
61 /* 3 bytes */
62 unsigned int att_opaquemask : 24; /* (reserved for ADSTAR use) */
63
64 /* ATTVISIBLEMASK = 1 byte */
65 unsigned int att_visblmaskres : 2, /* (reserved for visible mask use) */
66 att_nodelfilesmask : 1, /* X'20' 1=Files should not be deleted */
67 att_sharelibmask : 1, /* X'10' 1=Shared Library Mask */
68 att_noshareasmask : 1, /* X'08' 1=No Shareas Flag Mask */
69 att_apfauthmask : 1, /* X'04' 1=APF Authorized Flag Mask */
70 att_progctlmask : 1, /* X'02' 1=Prog. Control Flag Mask */
71 att_visblmskrmain : 1; /* (reserved flag mask bit) */
72
73 /* ATTGENVALUE = 0 bytes */
74 /* 3 bytes */
75 unsigned int att_opaque : 24; /* (reserved for ADSTAR use) */
76
78 unsigned int att_visibleres : 2, /* (reserved for visible flag use) */
79 att_nodelfiles : 1, /* X'20' 1=Files should not be deleted */
80 att_sharelib : 1, /* X'10' 1=Shared Library Flag */
81 att_noshareas : 1, /* X'08' 1=No Shareas Flag */
82 att_apfauth : 1, /* X'04' 1=APF Authorized Flag */
83 att_progctl : 1, /* X'02' 1=Program Controlled Flag */
84 att_visblrmain : 1; /* (reserved flag mask bit) */
85
86 int att_size_h; /* first word of size */
87 int att_size_l; /* second word of size */
88 int att_atime; /* Time of last access */
89 int att_mtime; /* Time of last data modification */
90
91 int att_auditoraudit; /* Area for auditor audit info */
92 int att_useraudit; /* Area for user audit info */
93
94 int att_ctime; /* Time of last file statuse change */
95 int att_reftime; /* Reference Time */
96
97 /* End of version 1 */
98
99 char att_filefmt; /* File Format */
100 char att_res02[3]; /* (reserved for expansion) */
101 int att_filetag; /* File Tag */
102 char att_res03[8]; /* (reserved for expansion) */
103
104 /* End of version 2 */
105
106 long att_atime64; /* Time of last access */
107 long att_mtime64; /* Time of last data modification */
108 long att_ctime64; /* Time of last file statuse change */
109 long att_reftime64; /* Reference Time */
110 char att_seclabel[8]; /* Security Label */
111 char att_ver3res02[8]; /* (reserved for expansion) */
112
113 /* End of version 3 */
115
116#ifdef __cplusplus
117extern "C" {
118#endif
119
120/* TODO(gabylb): zos - document */
121__Z_EXPORT char *__ptr32 *__ptr32 __uss_base_address(void);
122__Z_EXPORT void __bpx4kil(int pid, int signal, void *signal_options,
123 int *return_value,
124 int *return_code, int *reason_code);
125__Z_EXPORT void __bpx4frk(int *pid, int *return_code, int *reason_code);
126__Z_EXPORT void __bpx4ctw(unsigned int *secs, unsigned int *nsecs,
127 unsigned int *event_list, unsigned int *secs_rem,
128 unsigned int *nsecs_rem, int *return_value,
129 int *return_code, int *reason_code);
130__Z_EXPORT void __bpx4gth(int *input_length, void **input_address,
131 int *output_length,
132 void **output_address, int *return_value,
133 int *return_code, int *reason_code);
134__Z_EXPORT void __bpx4lcr(int pathname_length, char *pathname,
135 int attributes_length, __bpxyatt_t *attributes,
136 int *return_value, int *return_code,
137 int *reason_code);
138
139#ifdef __cplusplus
140}
141#endif
142#endif // ZOS_BPX_H_
Definition zos-bpx.h:24
int att_gid
Definition zos-bpx.h:59
unsigned int att_noshareasmask
Definition zos-bpx.h:68
unsigned int att_ctimechg
Definition zos-bpx.h:42
char att_setflags4
Definition zos-bpx.h:55
long att_ctime64
Definition zos-bpx.h:108
unsigned int att_charsetidchg
Definition zos-bpx.h:51
int att_uid
Definition zos-bpx.h:58
unsigned int att_lp64times
Definition zos-bpx.h:52
int att_atime
Definition zos-bpx.h:88
unsigned int att_opaquemask
Definition zos-bpx.h:62
int att_useraudit
Definition zos-bpx.h:92
int att_reftime
Definition zos-bpx.h:95
int att_ctime
Definition zos-bpx.h:94
unsigned int att_opaque
Definition zos-bpx.h:75
char att_res02[3]
Definition zos-bpx.h:100
char att_filefmt
Definition zos-bpx.h:99
unsigned int att_atimetod
Definition zos-bpx.h:35
unsigned int att_nodelfiles
Definition zos-bpx.h:79
char att_seclabel[8]
Definition zos-bpx.h:110
unsigned int att_maaudit
Definition zos-bpx.h:40
unsigned int att_visibleres
Definition zos-bpx.h:78
unsigned int att_nodelfilesmask
Definition zos-bpx.h:66
char att_ver3res02[8]
Definition zos-bpx.h:111
unsigned int att_reftimechg
Definition zos-bpx.h:44
long att_reftime64
Definition zos-bpx.h:109
unsigned int att_visblrmain
Definition zos-bpx.h:84
int att_filetag
Definition zos-bpx.h:101
unsigned int att_res04
Definition zos-bpx.h:47
short att_version
Definition zos-bpx.h:26
char att_id[4]
Definition zos-bpx.h:25
int att_mtime
Definition zos-bpx.h:89
unsigned int att_atimechg
Definition zos-bpx.h:34
unsigned int att_progctl
Definition zos-bpx.h:83
unsigned int att_filefmtchg
Definition zos-bpx.h:46
long att_atime64
Definition zos-bpx.h:106
unsigned int att_muaudit
Definition zos-bpx.h:41
unsigned int att_ctimetod
Definition zos-bpx.h:43
unsigned int att_trunc
Definition zos-bpx.h:33
unsigned int att_apfauthmask
Definition zos-bpx.h:69
unsigned int att_visblmskrmain
Definition zos-bpx.h:71
int att_auditoraudit
Definition zos-bpx.h:91
unsigned int att_apfauth
Definition zos-bpx.h:82
int att_size_l
Definition zos-bpx.h:87
unsigned int att_ownerchg
Definition zos-bpx.h:31
long att_mtime64
Definition zos-bpx.h:107
unsigned int att_visblmaskres
Definition zos-bpx.h:65
unsigned int att_modechg
Definition zos-bpx.h:30
char att_res01[2]
Definition zos-bpx.h:27
unsigned int att_sharelib
Definition zos-bpx.h:80
unsigned int att_seclabelchg
Definition zos-bpx.h:53
int att_size_h
Definition zos-bpx.h:86
unsigned int att_sharelibmask
Definition zos-bpx.h:67
int att_mode
Definition zos-bpx.h:57
char att_res03[8]
Definition zos-bpx.h:102
unsigned int att_mtimetod
Definition zos-bpx.h:37
unsigned int att_res05
Definition zos-bpx.h:50
unsigned int att_setgen
Definition zos-bpx.h:32
unsigned int att_reftimetod
Definition zos-bpx.h:45
unsigned int att_mtimechg
Definition zos-bpx.h:36
unsigned int att_noshareas
Definition zos-bpx.h:81
unsigned int att_progctlmask
Definition zos-bpx.h:70
struct __bpxyatt __bpxyatt_t
__Z_EXPORT void __bpx4frk(int *pid, int *return_code, int *reason_code)
Definition zos-bpx.cc:105
__Z_EXPORT void __bpx4kil(int pid, int signal, void *signal_options, int *return_value, int *return_code, int *reason_code)
Definition zos-bpx.cc:94
__Z_EXPORT void __bpx4ctw(unsigned int *secs, unsigned int *nsecs, unsigned int *event_list, unsigned int *secs_rem, unsigned int *nsecs_rem, int *return_value, int *return_code, int *reason_code)
Definition zos-bpx.cc:114
__Z_EXPORT void __bpx4gth(int *input_length, void **input_address, int *output_length, void **output_address, int *return_value, int *return_code, int *reason_code)
Definition zos-bpx.cc:127
__Z_EXPORT void __bpx4lcr(int pathname_length, char *pathname, int attributes_length, __bpxyatt_t *attributes, int *return_value, int *return_code, int *reason_code)
Definition zos-bpx.cc:143
__Z_EXPORT char *__ptr32 *__ptr32 __uss_base_address(void)
Definition zos-bpx.cc:29
#define __Z_EXPORT
Definition zos-macros.h:13