github.com/isyscore/isc-gobase@v1.5.3-0.20231218061332-cbc7451899e9/system/process/process_darwin_amd64.go (about)

     1  package process
     2  
     3  const (
     4  	sizeofPtr      = 0x8
     5  	sizeofShort    = 0x2
     6  	sizeofInt      = 0x4
     7  	sizeofLong     = 0x8
     8  	sizeofLongLong = 0x8
     9  )
    10  
    11  type (
    12  	_C_short     int16
    13  	_C_int       int32
    14  	_C_long      int64
    15  	_C_long_long int64
    16  )
    17  
    18  type Timespec struct {
    19  	Sec  int64
    20  	Nsec int64
    21  }
    22  
    23  type Timeval struct {
    24  	Sec       int64
    25  	Usec      int32
    26  	Pad_cgo_0 [4]byte
    27  }
    28  
    29  type Rusage struct {
    30  	Utime    Timeval
    31  	Stime    Timeval
    32  	Maxrss   int64
    33  	Ixrss    int64
    34  	Idrss    int64
    35  	Isrss    int64
    36  	Minflt   int64
    37  	Majflt   int64
    38  	Nswap    int64
    39  	Inblock  int64
    40  	Oublock  int64
    41  	Msgsnd   int64
    42  	Msgrcv   int64
    43  	Nsignals int64
    44  	Nvcsw    int64
    45  	Nivcsw   int64
    46  }
    47  
    48  type Rlimit struct {
    49  	Cur uint64
    50  	Max uint64
    51  }
    52  
    53  type UGid_t uint32
    54  
    55  type KinfoProc struct {
    56  	Proc  ExternProc
    57  	Eproc Eproc
    58  }
    59  
    60  type Eproc struct {
    61  	Paddr     *uint64
    62  	Sess      *Session
    63  	Pcred     Upcred
    64  	Ucred     Uucred
    65  	Pad_cgo_0 [4]byte
    66  	Vm        Vmspace
    67  	Ppid      int32
    68  	Pgid      int32
    69  	Jobc      int16
    70  	Pad_cgo_1 [2]byte
    71  	Tdev      int32
    72  	Tpgid     int32
    73  	Pad_cgo_2 [4]byte
    74  	Tsess     *Session
    75  	Wmesg     [8]int8
    76  	Xsize     int32
    77  	Xrssize   int16
    78  	Xccount   int16
    79  	Xswrss    int16
    80  	Pad_cgo_3 [2]byte
    81  	Flag      int32
    82  	Login     [12]int8
    83  	Spare     [4]int32
    84  	Pad_cgo_4 [4]byte
    85  }
    86  
    87  type Proc struct{}
    88  
    89  type Session struct{}
    90  
    91  type ucred struct {
    92  	Link  _Ctype_struct___0
    93  	Ref   uint64
    94  	Posix Posix_cred
    95  	Label *Label
    96  	Audit Au_session
    97  }
    98  
    99  type Uucred struct {
   100  	Ref       int32
   101  	UID       uint32
   102  	Ngroups   int16
   103  	Pad_cgo_0 [2]byte
   104  	Groups    [16]uint32
   105  }
   106  
   107  type Upcred struct {
   108  	Pc_lock   [72]int8
   109  	Pc_ucred  *ucred
   110  	P_ruid    uint32
   111  	P_svuid   uint32
   112  	P_rgid    uint32
   113  	P_svgid   uint32
   114  	P_refcnt  int32
   115  	Pad_cgo_0 [4]byte
   116  }
   117  
   118  type Vmspace struct {
   119  	Dummy     int32
   120  	Pad_cgo_0 [4]byte
   121  	Dummy2    *int8
   122  	Dummy3    [5]int32
   123  	Pad_cgo_1 [4]byte
   124  	Dummy4    [3]*int8
   125  }
   126  
   127  type Sigacts struct{}
   128  
   129  type ExternProc struct {
   130  	P_un        [16]byte
   131  	P_vmspace   uint64
   132  	P_sigacts   uint64
   133  	Pad_cgo_0   [3]byte
   134  	P_flag      int32
   135  	P_stat      int8
   136  	P_pid       int32
   137  	P_oppid     int32
   138  	P_dupfd     int32
   139  	Pad_cgo_1   [4]byte
   140  	User_stack  uint64
   141  	Exit_thread uint64
   142  	P_debugger  int32
   143  	Sigwait     int32
   144  	P_estcpu    uint32
   145  	P_cpticks   int32
   146  	P_pctcpu    uint32
   147  	Pad_cgo_2   [4]byte
   148  	P_wchan     uint64
   149  	P_wmesg     uint64
   150  	P_swtime    uint32
   151  	P_slptime   uint32
   152  	P_realtimer Itimerval
   153  	P_rtime     Timeval
   154  	P_uticks    uint64
   155  	P_sticks    uint64
   156  	P_iticks    uint64
   157  	P_traceflag int32
   158  	Pad_cgo_3   [4]byte
   159  	P_tracep    uint64
   160  	P_siglist   int32
   161  	Pad_cgo_4   [4]byte
   162  	P_textvp    uint64
   163  	P_holdcnt   int32
   164  	P_sigmask   uint32
   165  	P_sigignore uint32
   166  	P_sigcatch  uint32
   167  	P_priority  uint8
   168  	P_usrpri    uint8
   169  	P_nice      int8
   170  	P_comm      [17]int8
   171  	Pad_cgo_5   [4]byte
   172  	P_pgrp      uint64
   173  	P_addr      uint64
   174  	P_xstat     uint16
   175  	P_acflag    uint16
   176  	Pad_cgo_6   [4]byte
   177  	P_ru        uint64
   178  }
   179  
   180  type Itimerval struct {
   181  	Interval Timeval
   182  	Value    Timeval
   183  }
   184  
   185  type Vnode struct{}
   186  
   187  type Pgrp struct{}
   188  
   189  type UserStruct struct{}
   190  
   191  type Au_session struct {
   192  	Aia_p *AuditinfoAddr
   193  	Mask  AuMask
   194  }
   195  
   196  type Posix_cred struct {
   197  	UID       uint32
   198  	Ruid      uint32
   199  	Svuid     uint32
   200  	Ngroups   int16
   201  	Pad_cgo_0 [2]byte
   202  	Groups    [16]uint32
   203  	Rgid      uint32
   204  	Svgid     uint32
   205  	Gmuid     uint32
   206  	Flags     int32
   207  }
   208  
   209  type Label struct{}
   210  
   211  type AuditinfoAddr struct {
   212  	Auid   uint32
   213  	Mask   AuMask
   214  	Termid AuTidAddr
   215  	Asid   int32
   216  	Flags  uint64
   217  }
   218  type AuMask struct {
   219  	Success uint32
   220  	Failure uint32
   221  }
   222  type AuTidAddr struct {
   223  	Port int32
   224  	Type uint32
   225  	Addr [4]uint32
   226  }
   227  
   228  type UcredQueue struct {
   229  	Next *ucred
   230  	Prev **ucred
   231  }