golang.org/x/sys@v0.20.1-0.20240517151509-673e0f94c16d/unix/ztypes_linux_riscv64.go (about)

     1  // cgo -godefs -objdir=/tmp/riscv64/cgo -- -Wall -Werror -static -I/tmp/riscv64/include linux/types.go | go run mkpost.go
     2  // Code generated by the command above; see README.md. DO NOT EDIT.
     3  
     4  //go:build riscv64 && linux
     5  
     6  package unix
     7  
     8  const (
     9  	SizeofPtr  = 0x8
    10  	SizeofLong = 0x8
    11  )
    12  
    13  type (
    14  	_C_long int64
    15  )
    16  
    17  type Timespec struct {
    18  	Sec  int64
    19  	Nsec int64
    20  }
    21  
    22  type Timeval struct {
    23  	Sec  int64
    24  	Usec int64
    25  }
    26  
    27  type Timex struct {
    28  	Modes     uint32
    29  	Offset    int64
    30  	Freq      int64
    31  	Maxerror  int64
    32  	Esterror  int64
    33  	Status    int32
    34  	Constant  int64
    35  	Precision int64
    36  	Tolerance int64
    37  	Time      Timeval
    38  	Tick      int64
    39  	Ppsfreq   int64
    40  	Jitter    int64
    41  	Shift     int32
    42  	Stabil    int64
    43  	Jitcnt    int64
    44  	Calcnt    int64
    45  	Errcnt    int64
    46  	Stbcnt    int64
    47  	Tai       int32
    48  	_         [44]byte
    49  }
    50  
    51  type Time_t int64
    52  
    53  type Tms struct {
    54  	Utime  int64
    55  	Stime  int64
    56  	Cutime int64
    57  	Cstime int64
    58  }
    59  
    60  type Utimbuf struct {
    61  	Actime  int64
    62  	Modtime int64
    63  }
    64  
    65  type Rusage struct {
    66  	Utime    Timeval
    67  	Stime    Timeval
    68  	Maxrss   int64
    69  	Ixrss    int64
    70  	Idrss    int64
    71  	Isrss    int64
    72  	Minflt   int64
    73  	Majflt   int64
    74  	Nswap    int64
    75  	Inblock  int64
    76  	Oublock  int64
    77  	Msgsnd   int64
    78  	Msgrcv   int64
    79  	Nsignals int64
    80  	Nvcsw    int64
    81  	Nivcsw   int64
    82  }
    83  
    84  type Stat_t struct {
    85  	Dev     uint64
    86  	Ino     uint64
    87  	Mode    uint32
    88  	Nlink   uint32
    89  	Uid     uint32
    90  	Gid     uint32
    91  	Rdev    uint64
    92  	_       uint64
    93  	Size    int64
    94  	Blksize int32
    95  	_       int32
    96  	Blocks  int64
    97  	Atim    Timespec
    98  	Mtim    Timespec
    99  	Ctim    Timespec
   100  	_       [2]int32
   101  }
   102  
   103  type Dirent struct {
   104  	Ino    uint64
   105  	Off    int64
   106  	Reclen uint16
   107  	Type   uint8
   108  	Name   [256]uint8
   109  	_      [5]byte
   110  }
   111  
   112  type Flock_t struct {
   113  	Type   int16
   114  	Whence int16
   115  	Start  int64
   116  	Len    int64
   117  	Pid    int32
   118  	_      [4]byte
   119  }
   120  
   121  type DmNameList struct {
   122  	Dev  uint64
   123  	Next uint32
   124  	Name [0]byte
   125  	_    [4]byte
   126  }
   127  
   128  const (
   129  	FADV_DONTNEED = 0x4
   130  	FADV_NOREUSE  = 0x5
   131  )
   132  
   133  type RawSockaddrNFCLLCP struct {
   134  	Sa_family        uint16
   135  	Dev_idx          uint32
   136  	Target_idx       uint32
   137  	Nfc_protocol     uint32
   138  	Dsap             uint8
   139  	Ssap             uint8
   140  	Service_name     [63]uint8
   141  	Service_name_len uint64
   142  }
   143  
   144  type RawSockaddr struct {
   145  	Family uint16
   146  	Data   [14]uint8
   147  }
   148  
   149  type RawSockaddrAny struct {
   150  	Addr RawSockaddr
   151  	Pad  [96]uint8
   152  }
   153  
   154  type Iovec struct {
   155  	Base *byte
   156  	Len  uint64
   157  }
   158  
   159  type Msghdr struct {
   160  	Name       *byte
   161  	Namelen    uint32
   162  	Iov        *Iovec
   163  	Iovlen     uint64
   164  	Control    *byte
   165  	Controllen uint64
   166  	Flags      int32
   167  	_          [4]byte
   168  }
   169  
   170  type Cmsghdr struct {
   171  	Len   uint64
   172  	Level int32
   173  	Type  int32
   174  }
   175  
   176  type ifreq struct {
   177  	Ifrn [16]byte
   178  	Ifru [24]byte
   179  }
   180  
   181  const (
   182  	SizeofSockaddrNFCLLCP = 0x60
   183  	SizeofIovec           = 0x10
   184  	SizeofMsghdr          = 0x38
   185  	SizeofCmsghdr         = 0x10
   186  )
   187  
   188  const (
   189  	SizeofSockFprog = 0x10
   190  )
   191  
   192  type PtraceRegs struct {
   193  	Pc  uint64
   194  	Ra  uint64
   195  	Sp  uint64
   196  	Gp  uint64
   197  	Tp  uint64
   198  	T0  uint64
   199  	T1  uint64
   200  	T2  uint64
   201  	S0  uint64
   202  	S1  uint64
   203  	A0  uint64
   204  	A1  uint64
   205  	A2  uint64
   206  	A3  uint64
   207  	A4  uint64
   208  	A5  uint64
   209  	A6  uint64
   210  	A7  uint64
   211  	S2  uint64
   212  	S3  uint64
   213  	S4  uint64
   214  	S5  uint64
   215  	S6  uint64
   216  	S7  uint64
   217  	S8  uint64
   218  	S9  uint64
   219  	S10 uint64
   220  	S11 uint64
   221  	T3  uint64
   222  	T4  uint64
   223  	T5  uint64
   224  	T6  uint64
   225  }
   226  
   227  type FdSet struct {
   228  	Bits [16]int64
   229  }
   230  
   231  type Sysinfo_t struct {
   232  	Uptime    int64
   233  	Loads     [3]uint64
   234  	Totalram  uint64
   235  	Freeram   uint64
   236  	Sharedram uint64
   237  	Bufferram uint64
   238  	Totalswap uint64
   239  	Freeswap  uint64
   240  	Procs     uint16
   241  	Pad       uint16
   242  	Totalhigh uint64
   243  	Freehigh  uint64
   244  	Unit      uint32
   245  	_         [0]uint8
   246  	_         [4]byte
   247  }
   248  
   249  type Ustat_t struct {
   250  	Tfree  int32
   251  	Tinode uint64
   252  	Fname  [6]uint8
   253  	Fpack  [6]uint8
   254  	_      [4]byte
   255  }
   256  
   257  type EpollEvent struct {
   258  	Events uint32
   259  	_      int32
   260  	Fd     int32
   261  	Pad    int32
   262  }
   263  
   264  const (
   265  	OPEN_TREE_CLOEXEC = 0x80000
   266  )
   267  
   268  const (
   269  	POLLRDHUP = 0x2000
   270  )
   271  
   272  type Sigset_t struct {
   273  	Val [16]uint64
   274  }
   275  
   276  const _C__NSIG = 0x41
   277  
   278  const (
   279  	SIG_BLOCK   = 0x0
   280  	SIG_UNBLOCK = 0x1
   281  	SIG_SETMASK = 0x2
   282  )
   283  
   284  type Siginfo struct {
   285  	Signo int32
   286  	Errno int32
   287  	Code  int32
   288  	_     int32
   289  	_     [112]byte
   290  }
   291  
   292  type Termios struct {
   293  	Iflag  uint32
   294  	Oflag  uint32
   295  	Cflag  uint32
   296  	Lflag  uint32
   297  	Line   uint8
   298  	Cc     [19]uint8
   299  	Ispeed uint32
   300  	Ospeed uint32
   301  }
   302  
   303  type Taskstats struct {
   304  	Version                   uint16
   305  	Ac_exitcode               uint32
   306  	Ac_flag                   uint8
   307  	Ac_nice                   uint8
   308  	Cpu_count                 uint64
   309  	Cpu_delay_total           uint64
   310  	Blkio_count               uint64
   311  	Blkio_delay_total         uint64
   312  	Swapin_count              uint64
   313  	Swapin_delay_total        uint64
   314  	Cpu_run_real_total        uint64
   315  	Cpu_run_virtual_total     uint64
   316  	Ac_comm                   [32]uint8
   317  	Ac_sched                  uint8
   318  	Ac_pad                    [3]uint8
   319  	_                         [4]byte
   320  	Ac_uid                    uint32
   321  	Ac_gid                    uint32
   322  	Ac_pid                    uint32
   323  	Ac_ppid                   uint32
   324  	Ac_btime                  uint32
   325  	Ac_etime                  uint64
   326  	Ac_utime                  uint64
   327  	Ac_stime                  uint64
   328  	Ac_minflt                 uint64
   329  	Ac_majflt                 uint64
   330  	Coremem                   uint64
   331  	Virtmem                   uint64
   332  	Hiwater_rss               uint64
   333  	Hiwater_vm                uint64
   334  	Read_char                 uint64
   335  	Write_char                uint64
   336  	Read_syscalls             uint64
   337  	Write_syscalls            uint64
   338  	Read_bytes                uint64
   339  	Write_bytes               uint64
   340  	Cancelled_write_bytes     uint64
   341  	Nvcsw                     uint64
   342  	Nivcsw                    uint64
   343  	Ac_utimescaled            uint64
   344  	Ac_stimescaled            uint64
   345  	Cpu_scaled_run_real_total uint64
   346  	Freepages_count           uint64
   347  	Freepages_delay_total     uint64
   348  	Thrashing_count           uint64
   349  	Thrashing_delay_total     uint64
   350  	Ac_btime64                uint64
   351  	Compact_count             uint64
   352  	Compact_delay_total       uint64
   353  	Ac_tgid                   uint32
   354  	Ac_tgetime                uint64
   355  	Ac_exe_dev                uint64
   356  	Ac_exe_inode              uint64
   357  	Wpcopy_count              uint64
   358  	Wpcopy_delay_total        uint64
   359  	Irq_count                 uint64
   360  	Irq_delay_total           uint64
   361  }
   362  
   363  type cpuMask uint64
   364  
   365  const (
   366  	_NCPUBITS = 0x40
   367  )
   368  
   369  const (
   370  	CBitFieldMaskBit0  = 0x1
   371  	CBitFieldMaskBit1  = 0x2
   372  	CBitFieldMaskBit2  = 0x4
   373  	CBitFieldMaskBit3  = 0x8
   374  	CBitFieldMaskBit4  = 0x10
   375  	CBitFieldMaskBit5  = 0x20
   376  	CBitFieldMaskBit6  = 0x40
   377  	CBitFieldMaskBit7  = 0x80
   378  	CBitFieldMaskBit8  = 0x100
   379  	CBitFieldMaskBit9  = 0x200
   380  	CBitFieldMaskBit10 = 0x400
   381  	CBitFieldMaskBit11 = 0x800
   382  	CBitFieldMaskBit12 = 0x1000
   383  	CBitFieldMaskBit13 = 0x2000
   384  	CBitFieldMaskBit14 = 0x4000
   385  	CBitFieldMaskBit15 = 0x8000
   386  	CBitFieldMaskBit16 = 0x10000
   387  	CBitFieldMaskBit17 = 0x20000
   388  	CBitFieldMaskBit18 = 0x40000
   389  	CBitFieldMaskBit19 = 0x80000
   390  	CBitFieldMaskBit20 = 0x100000
   391  	CBitFieldMaskBit21 = 0x200000
   392  	CBitFieldMaskBit22 = 0x400000
   393  	CBitFieldMaskBit23 = 0x800000
   394  	CBitFieldMaskBit24 = 0x1000000
   395  	CBitFieldMaskBit25 = 0x2000000
   396  	CBitFieldMaskBit26 = 0x4000000
   397  	CBitFieldMaskBit27 = 0x8000000
   398  	CBitFieldMaskBit28 = 0x10000000
   399  	CBitFieldMaskBit29 = 0x20000000
   400  	CBitFieldMaskBit30 = 0x40000000
   401  	CBitFieldMaskBit31 = 0x80000000
   402  	CBitFieldMaskBit32 = 0x100000000
   403  	CBitFieldMaskBit33 = 0x200000000
   404  	CBitFieldMaskBit34 = 0x400000000
   405  	CBitFieldMaskBit35 = 0x800000000
   406  	CBitFieldMaskBit36 = 0x1000000000
   407  	CBitFieldMaskBit37 = 0x2000000000
   408  	CBitFieldMaskBit38 = 0x4000000000
   409  	CBitFieldMaskBit39 = 0x8000000000
   410  	CBitFieldMaskBit40 = 0x10000000000
   411  	CBitFieldMaskBit41 = 0x20000000000
   412  	CBitFieldMaskBit42 = 0x40000000000
   413  	CBitFieldMaskBit43 = 0x80000000000
   414  	CBitFieldMaskBit44 = 0x100000000000
   415  	CBitFieldMaskBit45 = 0x200000000000
   416  	CBitFieldMaskBit46 = 0x400000000000
   417  	CBitFieldMaskBit47 = 0x800000000000
   418  	CBitFieldMaskBit48 = 0x1000000000000
   419  	CBitFieldMaskBit49 = 0x2000000000000
   420  	CBitFieldMaskBit50 = 0x4000000000000
   421  	CBitFieldMaskBit51 = 0x8000000000000
   422  	CBitFieldMaskBit52 = 0x10000000000000
   423  	CBitFieldMaskBit53 = 0x20000000000000
   424  	CBitFieldMaskBit54 = 0x40000000000000
   425  	CBitFieldMaskBit55 = 0x80000000000000
   426  	CBitFieldMaskBit56 = 0x100000000000000
   427  	CBitFieldMaskBit57 = 0x200000000000000
   428  	CBitFieldMaskBit58 = 0x400000000000000
   429  	CBitFieldMaskBit59 = 0x800000000000000
   430  	CBitFieldMaskBit60 = 0x1000000000000000
   431  	CBitFieldMaskBit61 = 0x2000000000000000
   432  	CBitFieldMaskBit62 = 0x4000000000000000
   433  	CBitFieldMaskBit63 = 0x8000000000000000
   434  )
   435  
   436  type SockaddrStorage struct {
   437  	Family uint16
   438  	Data   [118]byte
   439  	_      uint64
   440  }
   441  
   442  type HDGeometry struct {
   443  	Heads     uint8
   444  	Sectors   uint8
   445  	Cylinders uint16
   446  	Start     uint64
   447  }
   448  
   449  type Statfs_t struct {
   450  	Type    int64
   451  	Bsize   int64
   452  	Blocks  uint64
   453  	Bfree   uint64
   454  	Bavail  uint64
   455  	Files   uint64
   456  	Ffree   uint64
   457  	Fsid    Fsid
   458  	Namelen int64
   459  	Frsize  int64
   460  	Flags   int64
   461  	Spare   [4]int64
   462  }
   463  
   464  type TpacketHdr struct {
   465  	Status  uint64
   466  	Len     uint32
   467  	Snaplen uint32
   468  	Mac     uint16
   469  	Net     uint16
   470  	Sec     uint32
   471  	Usec    uint32
   472  	_       [4]byte
   473  }
   474  
   475  const (
   476  	SizeofTpacketHdr = 0x20
   477  )
   478  
   479  type RTCPLLInfo struct {
   480  	Ctrl    int32
   481  	Value   int32
   482  	Max     int32
   483  	Min     int32
   484  	Posmult int32
   485  	Negmult int32
   486  	Clock   int64
   487  }
   488  
   489  type BlkpgPartition struct {
   490  	Start   int64
   491  	Length  int64
   492  	Pno     int32
   493  	Devname [64]uint8
   494  	Volname [64]uint8
   495  	_       [4]byte
   496  }
   497  
   498  const (
   499  	BLKPG = 0x1269
   500  )
   501  
   502  type CryptoUserAlg struct {
   503  	Name        [64]uint8
   504  	Driver_name [64]uint8
   505  	Module_name [64]uint8
   506  	Type        uint32
   507  	Mask        uint32
   508  	Refcnt      uint32
   509  	Flags       uint32
   510  }
   511  
   512  type CryptoStatAEAD struct {
   513  	Type         [64]uint8
   514  	Encrypt_cnt  uint64
   515  	Encrypt_tlen uint64
   516  	Decrypt_cnt  uint64
   517  	Decrypt_tlen uint64
   518  	Err_cnt      uint64
   519  }
   520  
   521  type CryptoStatAKCipher struct {
   522  	Type         [64]uint8
   523  	Encrypt_cnt  uint64
   524  	Encrypt_tlen uint64
   525  	Decrypt_cnt  uint64
   526  	Decrypt_tlen uint64
   527  	Verify_cnt   uint64
   528  	Sign_cnt     uint64
   529  	Err_cnt      uint64
   530  }
   531  
   532  type CryptoStatCipher struct {
   533  	Type         [64]uint8
   534  	Encrypt_cnt  uint64
   535  	Encrypt_tlen uint64
   536  	Decrypt_cnt  uint64
   537  	Decrypt_tlen uint64
   538  	Err_cnt      uint64
   539  }
   540  
   541  type CryptoStatCompress struct {
   542  	Type            [64]uint8
   543  	Compress_cnt    uint64
   544  	Compress_tlen   uint64
   545  	Decompress_cnt  uint64
   546  	Decompress_tlen uint64
   547  	Err_cnt         uint64
   548  }
   549  
   550  type CryptoStatHash struct {
   551  	Type      [64]uint8
   552  	Hash_cnt  uint64
   553  	Hash_tlen uint64
   554  	Err_cnt   uint64
   555  }
   556  
   557  type CryptoStatKPP struct {
   558  	Type                      [64]uint8
   559  	Setsecret_cnt             uint64
   560  	Generate_public_key_cnt   uint64
   561  	Compute_shared_secret_cnt uint64
   562  	Err_cnt                   uint64
   563  }
   564  
   565  type CryptoStatRNG struct {
   566  	Type          [64]uint8
   567  	Generate_cnt  uint64
   568  	Generate_tlen uint64
   569  	Seed_cnt      uint64
   570  	Err_cnt       uint64
   571  }
   572  
   573  type CryptoStatLarval struct {
   574  	Type [64]uint8
   575  }
   576  
   577  type CryptoReportLarval struct {
   578  	Type [64]uint8
   579  }
   580  
   581  type CryptoReportHash struct {
   582  	Type       [64]uint8
   583  	Blocksize  uint32
   584  	Digestsize uint32
   585  }
   586  
   587  type CryptoReportCipher struct {
   588  	Type        [64]uint8
   589  	Blocksize   uint32
   590  	Min_keysize uint32
   591  	Max_keysize uint32
   592  }
   593  
   594  type CryptoReportBlkCipher struct {
   595  	Type        [64]uint8
   596  	Geniv       [64]uint8
   597  	Blocksize   uint32
   598  	Min_keysize uint32
   599  	Max_keysize uint32
   600  	Ivsize      uint32
   601  }
   602  
   603  type CryptoReportAEAD struct {
   604  	Type        [64]uint8
   605  	Geniv       [64]uint8
   606  	Blocksize   uint32
   607  	Maxauthsize uint32
   608  	Ivsize      uint32
   609  }
   610  
   611  type CryptoReportComp struct {
   612  	Type [64]uint8
   613  }
   614  
   615  type CryptoReportRNG struct {
   616  	Type     [64]uint8
   617  	Seedsize uint32
   618  }
   619  
   620  type CryptoReportAKCipher struct {
   621  	Type [64]uint8
   622  }
   623  
   624  type CryptoReportKPP struct {
   625  	Type [64]uint8
   626  }
   627  
   628  type CryptoReportAcomp struct {
   629  	Type [64]uint8
   630  }
   631  
   632  type LoopInfo struct {
   633  	Number           int32
   634  	Device           uint32
   635  	Inode            uint64
   636  	Rdevice          uint32
   637  	Offset           int32
   638  	Encrypt_type     int32
   639  	Encrypt_key_size int32
   640  	Flags            int32
   641  	Name             [64]uint8
   642  	Encrypt_key      [32]uint8
   643  	Init             [2]uint64
   644  	Reserved         [4]uint8
   645  	_                [4]byte
   646  }
   647  
   648  type TIPCSubscr struct {
   649  	Seq     TIPCServiceRange
   650  	Timeout uint32
   651  	Filter  uint32
   652  	Handle  [8]uint8
   653  }
   654  
   655  type TIPCSIOCLNReq struct {
   656  	Peer     uint32
   657  	Id       uint32
   658  	Linkname [68]uint8
   659  }
   660  
   661  type TIPCSIOCNodeIDReq struct {
   662  	Peer uint32
   663  	Id   [16]uint8
   664  }
   665  
   666  type PPSKInfo struct {
   667  	Assert_sequence uint32
   668  	Clear_sequence  uint32
   669  	Assert_tu       PPSKTime
   670  	Clear_tu        PPSKTime
   671  	Current_mode    int32
   672  	_               [4]byte
   673  }
   674  
   675  const (
   676  	PPS_GETPARAMS = 0x800870a1
   677  	PPS_SETPARAMS = 0x400870a2
   678  	PPS_GETCAP    = 0x800870a3
   679  	PPS_FETCH     = 0xc00870a4
   680  )
   681  
   682  const (
   683  	PIDFD_NONBLOCK = 0x800
   684  )
   685  
   686  type SysvIpcPerm struct {
   687  	Key  int32
   688  	Uid  uint32
   689  	Gid  uint32
   690  	Cuid uint32
   691  	Cgid uint32
   692  	Mode uint32
   693  	_    [0]uint8
   694  	Seq  uint16
   695  	_    uint16
   696  	_    uint64
   697  	_    uint64
   698  }
   699  type SysvShmDesc struct {
   700  	Perm   SysvIpcPerm
   701  	Segsz  uint64
   702  	Atime  int64
   703  	Dtime  int64
   704  	Ctime  int64
   705  	Cpid   int32
   706  	Lpid   int32
   707  	Nattch uint64
   708  	_      uint64
   709  	_      uint64
   710  }
   711  
   712  type RISCVHWProbePairs struct {
   713  	Key   int64
   714  	Value uint64
   715  }
   716  
   717  const (
   718  	RISCV_HWPROBE_KEY_MVENDORID          = 0x0
   719  	RISCV_HWPROBE_KEY_MARCHID            = 0x1
   720  	RISCV_HWPROBE_KEY_MIMPID             = 0x2
   721  	RISCV_HWPROBE_KEY_BASE_BEHAVIOR      = 0x3
   722  	RISCV_HWPROBE_BASE_BEHAVIOR_IMA      = 0x1
   723  	RISCV_HWPROBE_KEY_IMA_EXT_0          = 0x4
   724  	RISCV_HWPROBE_IMA_FD                 = 0x1
   725  	RISCV_HWPROBE_IMA_C                  = 0x2
   726  	RISCV_HWPROBE_IMA_V                  = 0x4
   727  	RISCV_HWPROBE_EXT_ZBA                = 0x8
   728  	RISCV_HWPROBE_EXT_ZBB                = 0x10
   729  	RISCV_HWPROBE_EXT_ZBS                = 0x20
   730  	RISCV_HWPROBE_KEY_CPUPERF_0          = 0x5
   731  	RISCV_HWPROBE_MISALIGNED_UNKNOWN     = 0x0
   732  	RISCV_HWPROBE_MISALIGNED_EMULATED    = 0x1
   733  	RISCV_HWPROBE_MISALIGNED_SLOW        = 0x2
   734  	RISCV_HWPROBE_MISALIGNED_FAST        = 0x3
   735  	RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4
   736  	RISCV_HWPROBE_MISALIGNED_MASK        = 0x7
   737  )