blob: 2f28fe26c1a533d7d5b988c6615163e0c26d3c15 [file] [log] [blame]
Clayton Townsend IIe052cef2022-07-22 08:59:55 -05001// cgo -godefs -objdir=/tmp/loong64/cgo -- -Wall -Werror -static -I/tmp/loong64/include linux/types.go | go run mkpost.go
limeidan88d2bb92022-04-09 11:17:10 +08002// Code generated by the command above; see README.md. DO NOT EDIT.
3
4//go:build loong64 && linux
limeidan88d2bb92022-04-09 11:17:10 +08005
6package unix
7
8const (
9 SizeofPtr = 0x8
10 SizeofLong = 0x8
11)
12
13type (
14 _C_long int64
15)
16
17type Timespec struct {
18 Sec int64
19 Nsec int64
20}
21
22type Timeval struct {
23 Sec int64
24 Usec int64
25}
26
27type 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
51type Time_t int64
52
53type Tms struct {
54 Utime int64
55 Stime int64
56 Cutime int64
57 Cstime int64
58}
59
60type Utimbuf struct {
61 Actime int64
62 Modtime int64
63}
64
65type 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
84type 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
103type Dirent struct {
104 Ino uint64
105 Off int64
106 Reclen uint16
107 Type uint8
108 Name [256]int8
109 _ [5]byte
110}
111
112type Flock_t struct {
113 Type int16
114 Whence int16
115 Start int64
116 Len int64
117 Pid int32
118 _ [4]byte
119}
120
121type DmNameList struct {
122 Dev uint64
123 Next uint32
124 Name [0]byte
125 _ [4]byte
126}
127
128const (
129 FADV_DONTNEED = 0x4
130 FADV_NOREUSE = 0x5
131)
132
133type 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
144type RawSockaddr struct {
145 Family uint16
146 Data [14]int8
147}
148
149type RawSockaddrAny struct {
150 Addr RawSockaddr
151 Pad [96]int8
152}
153
154type Iovec struct {
155 Base *byte
156 Len uint64
157}
158
159type 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
170type Cmsghdr struct {
171 Len uint64
172 Level int32
173 Type int32
174}
175
176type ifreq struct {
177 Ifrn [16]byte
178 Ifru [24]byte
179}
180
181const (
182 SizeofSockaddrNFCLLCP = 0x60
183 SizeofIovec = 0x10
184 SizeofMsghdr = 0x38
185 SizeofCmsghdr = 0x10
186)
187
188const (
189 SizeofSockFprog = 0x10
190)
191
192type PtraceRegs struct {
193 Regs [32]uint64
194 Orig_a0 uint64
195 Era uint64
196 Badv uint64
197 Reserved [10]uint64
198}
199
200type FdSet struct {
201 Bits [16]int64
202}
203
204type Sysinfo_t struct {
205 Uptime int64
206 Loads [3]uint64
207 Totalram uint64
208 Freeram uint64
209 Sharedram uint64
210 Bufferram uint64
211 Totalswap uint64
212 Freeswap uint64
213 Procs uint16
214 Pad uint16
215 Totalhigh uint64
216 Freehigh uint64
217 Unit uint32
218 _ [0]int8
219 _ [4]byte
220}
221
222type Ustat_t struct {
223 Tfree int32
224 Tinode uint64
225 Fname [6]int8
226 Fpack [6]int8
227 _ [4]byte
228}
229
230type EpollEvent struct {
231 Events uint32
232 _ int32
233 Fd int32
234 Pad int32
235}
236
237const (
238 OPEN_TREE_CLOEXEC = 0x80000
239)
240
241const (
242 POLLRDHUP = 0x2000
243)
244
245type Sigset_t struct {
246 Val [16]uint64
247}
248
249const _C__NSIG = 0x41
250
Lorenz Bauerc57c7932022-09-28 08:41:32 +0000251const (
252 SIG_BLOCK = 0x0
253 SIG_UNBLOCK = 0x1
254 SIG_SETMASK = 0x2
255)
256
limeidan88d2bb92022-04-09 11:17:10 +0800257type Siginfo struct {
258 Signo int32
259 Errno int32
260 Code int32
261 _ int32
262 _ [112]byte
263}
264
265type Termios struct {
266 Iflag uint32
267 Oflag uint32
268 Cflag uint32
269 Lflag uint32
270 Line uint8
271 Cc [19]uint8
272 Ispeed uint32
273 Ospeed uint32
274}
275
276type Taskstats struct {
277 Version uint16
278 Ac_exitcode uint32
279 Ac_flag uint8
280 Ac_nice uint8
281 Cpu_count uint64
282 Cpu_delay_total uint64
283 Blkio_count uint64
284 Blkio_delay_total uint64
285 Swapin_count uint64
286 Swapin_delay_total uint64
287 Cpu_run_real_total uint64
288 Cpu_run_virtual_total uint64
289 Ac_comm [32]int8
290 Ac_sched uint8
291 Ac_pad [3]uint8
292 _ [4]byte
293 Ac_uid uint32
294 Ac_gid uint32
295 Ac_pid uint32
296 Ac_ppid uint32
297 Ac_btime uint32
298 Ac_etime uint64
299 Ac_utime uint64
300 Ac_stime uint64
301 Ac_minflt uint64
302 Ac_majflt uint64
303 Coremem uint64
304 Virtmem uint64
305 Hiwater_rss uint64
306 Hiwater_vm uint64
307 Read_char uint64
308 Write_char uint64
309 Read_syscalls uint64
310 Write_syscalls uint64
311 Read_bytes uint64
312 Write_bytes uint64
313 Cancelled_write_bytes uint64
314 Nvcsw uint64
315 Nivcsw uint64
316 Ac_utimescaled uint64
317 Ac_stimescaled uint64
318 Cpu_scaled_run_real_total uint64
319 Freepages_count uint64
320 Freepages_delay_total uint64
321 Thrashing_count uint64
322 Thrashing_delay_total uint64
323 Ac_btime64 uint64
324 Compact_count uint64
325 Compact_delay_total uint64
Tobias Klauseraf788672022-06-15 13:46:28 +0200326 Ac_tgid uint32
327 Ac_tgetime uint64
328 Ac_exe_dev uint64
329 Ac_exe_inode uint64
330 Wpcopy_count uint64
331 Wpcopy_delay_total uint64
Tobias Klausera1a9c4b2023-06-26 15:37:18 +0200332 Irq_count uint64
333 Irq_delay_total uint64
limeidan88d2bb92022-04-09 11:17:10 +0800334}
335
336type cpuMask uint64
337
338const (
339 _NCPUBITS = 0x40
340)
341
342const (
343 CBitFieldMaskBit0 = 0x1
344 CBitFieldMaskBit1 = 0x2
345 CBitFieldMaskBit2 = 0x4
346 CBitFieldMaskBit3 = 0x8
347 CBitFieldMaskBit4 = 0x10
348 CBitFieldMaskBit5 = 0x20
349 CBitFieldMaskBit6 = 0x40
350 CBitFieldMaskBit7 = 0x80
351 CBitFieldMaskBit8 = 0x100
352 CBitFieldMaskBit9 = 0x200
353 CBitFieldMaskBit10 = 0x400
354 CBitFieldMaskBit11 = 0x800
355 CBitFieldMaskBit12 = 0x1000
356 CBitFieldMaskBit13 = 0x2000
357 CBitFieldMaskBit14 = 0x4000
358 CBitFieldMaskBit15 = 0x8000
359 CBitFieldMaskBit16 = 0x10000
360 CBitFieldMaskBit17 = 0x20000
361 CBitFieldMaskBit18 = 0x40000
362 CBitFieldMaskBit19 = 0x80000
363 CBitFieldMaskBit20 = 0x100000
364 CBitFieldMaskBit21 = 0x200000
365 CBitFieldMaskBit22 = 0x400000
366 CBitFieldMaskBit23 = 0x800000
367 CBitFieldMaskBit24 = 0x1000000
368 CBitFieldMaskBit25 = 0x2000000
369 CBitFieldMaskBit26 = 0x4000000
370 CBitFieldMaskBit27 = 0x8000000
371 CBitFieldMaskBit28 = 0x10000000
372 CBitFieldMaskBit29 = 0x20000000
373 CBitFieldMaskBit30 = 0x40000000
374 CBitFieldMaskBit31 = 0x80000000
375 CBitFieldMaskBit32 = 0x100000000
376 CBitFieldMaskBit33 = 0x200000000
377 CBitFieldMaskBit34 = 0x400000000
378 CBitFieldMaskBit35 = 0x800000000
379 CBitFieldMaskBit36 = 0x1000000000
380 CBitFieldMaskBit37 = 0x2000000000
381 CBitFieldMaskBit38 = 0x4000000000
382 CBitFieldMaskBit39 = 0x8000000000
383 CBitFieldMaskBit40 = 0x10000000000
384 CBitFieldMaskBit41 = 0x20000000000
385 CBitFieldMaskBit42 = 0x40000000000
386 CBitFieldMaskBit43 = 0x80000000000
387 CBitFieldMaskBit44 = 0x100000000000
388 CBitFieldMaskBit45 = 0x200000000000
389 CBitFieldMaskBit46 = 0x400000000000
390 CBitFieldMaskBit47 = 0x800000000000
391 CBitFieldMaskBit48 = 0x1000000000000
392 CBitFieldMaskBit49 = 0x2000000000000
393 CBitFieldMaskBit50 = 0x4000000000000
394 CBitFieldMaskBit51 = 0x8000000000000
395 CBitFieldMaskBit52 = 0x10000000000000
396 CBitFieldMaskBit53 = 0x20000000000000
397 CBitFieldMaskBit54 = 0x40000000000000
398 CBitFieldMaskBit55 = 0x80000000000000
399 CBitFieldMaskBit56 = 0x100000000000000
400 CBitFieldMaskBit57 = 0x200000000000000
401 CBitFieldMaskBit58 = 0x400000000000000
402 CBitFieldMaskBit59 = 0x800000000000000
403 CBitFieldMaskBit60 = 0x1000000000000000
404 CBitFieldMaskBit61 = 0x2000000000000000
405 CBitFieldMaskBit62 = 0x4000000000000000
406 CBitFieldMaskBit63 = 0x8000000000000000
407)
408
409type SockaddrStorage struct {
410 Family uint16
Tobias Klauser14708522023-03-02 16:17:12 +0100411 Data [118]byte
limeidan88d2bb92022-04-09 11:17:10 +0800412 _ uint64
413}
414
415type HDGeometry struct {
416 Heads uint8
417 Sectors uint8
418 Cylinders uint16
419 Start uint64
420}
421
422type Statfs_t struct {
423 Type int64
424 Bsize int64
425 Blocks uint64
426 Bfree uint64
427 Bavail uint64
428 Files uint64
429 Ffree uint64
430 Fsid Fsid
431 Namelen int64
432 Frsize int64
433 Flags int64
434 Spare [4]int64
435}
436
437type TpacketHdr struct {
438 Status uint64
439 Len uint32
440 Snaplen uint32
441 Mac uint16
442 Net uint16
443 Sec uint32
444 Usec uint32
445 _ [4]byte
446}
447
448const (
449 SizeofTpacketHdr = 0x20
450)
451
452type RTCPLLInfo struct {
453 Ctrl int32
454 Value int32
455 Max int32
456 Min int32
457 Posmult int32
458 Negmult int32
459 Clock int64
460}
461
462type BlkpgPartition struct {
463 Start int64
464 Length int64
465 Pno int32
466 Devname [64]uint8
467 Volname [64]uint8
468 _ [4]byte
469}
470
471const (
472 BLKPG = 0x1269
473)
474
limeidan88d2bb92022-04-09 11:17:10 +0800475type CryptoUserAlg struct {
476 Name [64]int8
477 Driver_name [64]int8
478 Module_name [64]int8
479 Type uint32
480 Mask uint32
481 Refcnt uint32
482 Flags uint32
483}
484
485type CryptoStatAEAD struct {
486 Type [64]int8
487 Encrypt_cnt uint64
488 Encrypt_tlen uint64
489 Decrypt_cnt uint64
490 Decrypt_tlen uint64
491 Err_cnt uint64
492}
493
494type CryptoStatAKCipher struct {
495 Type [64]int8
496 Encrypt_cnt uint64
497 Encrypt_tlen uint64
498 Decrypt_cnt uint64
499 Decrypt_tlen uint64
500 Verify_cnt uint64
501 Sign_cnt uint64
502 Err_cnt uint64
503}
504
505type CryptoStatCipher struct {
506 Type [64]int8
507 Encrypt_cnt uint64
508 Encrypt_tlen uint64
509 Decrypt_cnt uint64
510 Decrypt_tlen uint64
511 Err_cnt uint64
512}
513
514type CryptoStatCompress struct {
515 Type [64]int8
516 Compress_cnt uint64
517 Compress_tlen uint64
518 Decompress_cnt uint64
519 Decompress_tlen uint64
520 Err_cnt uint64
521}
522
523type CryptoStatHash struct {
524 Type [64]int8
525 Hash_cnt uint64
526 Hash_tlen uint64
527 Err_cnt uint64
528}
529
530type CryptoStatKPP struct {
531 Type [64]int8
532 Setsecret_cnt uint64
533 Generate_public_key_cnt uint64
534 Compute_shared_secret_cnt uint64
535 Err_cnt uint64
536}
537
538type CryptoStatRNG struct {
539 Type [64]int8
540 Generate_cnt uint64
541 Generate_tlen uint64
542 Seed_cnt uint64
543 Err_cnt uint64
544}
545
546type CryptoStatLarval struct {
547 Type [64]int8
548}
549
550type CryptoReportLarval struct {
551 Type [64]int8
552}
553
554type CryptoReportHash struct {
555 Type [64]int8
556 Blocksize uint32
557 Digestsize uint32
558}
559
560type CryptoReportCipher struct {
561 Type [64]int8
562 Blocksize uint32
563 Min_keysize uint32
564 Max_keysize uint32
565}
566
567type CryptoReportBlkCipher struct {
568 Type [64]int8
569 Geniv [64]int8
570 Blocksize uint32
571 Min_keysize uint32
572 Max_keysize uint32
573 Ivsize uint32
574}
575
576type CryptoReportAEAD struct {
577 Type [64]int8
578 Geniv [64]int8
579 Blocksize uint32
580 Maxauthsize uint32
581 Ivsize uint32
582}
583
584type CryptoReportComp struct {
585 Type [64]int8
586}
587
588type CryptoReportRNG struct {
589 Type [64]int8
590 Seedsize uint32
591}
592
593type CryptoReportAKCipher struct {
594 Type [64]int8
595}
596
597type CryptoReportKPP struct {
598 Type [64]int8
599}
600
601type CryptoReportAcomp struct {
602 Type [64]int8
603}
604
605type LoopInfo struct {
606 Number int32
607 Device uint32
608 Inode uint64
609 Rdevice uint32
610 Offset int32
611 Encrypt_type int32
612 Encrypt_key_size int32
613 Flags int32
614 Name [64]int8
615 Encrypt_key [32]uint8
616 Init [2]uint64
617 Reserved [4]int8
618 _ [4]byte
619}
620
621type TIPCSubscr struct {
622 Seq TIPCServiceRange
623 Timeout uint32
624 Filter uint32
625 Handle [8]int8
626}
627
628type TIPCSIOCLNReq struct {
629 Peer uint32
630 Id uint32
631 Linkname [68]int8
632}
633
634type TIPCSIOCNodeIDReq struct {
635 Peer uint32
636 Id [16]int8
637}
638
639type PPSKInfo struct {
640 Assert_sequence uint32
641 Clear_sequence uint32
642 Assert_tu PPSKTime
643 Clear_tu PPSKTime
644 Current_mode int32
645 _ [4]byte
646}
647
648const (
649 PPS_GETPARAMS = 0x800870a1
650 PPS_SETPARAMS = 0x400870a2
651 PPS_GETCAP = 0x800870a3
652 PPS_FETCH = 0xc00870a4
653)
654
655const (
656 PIDFD_NONBLOCK = 0x800
657)
658
659type SysvIpcPerm struct {
660 Key int32
661 Uid uint32
662 Gid uint32
663 Cuid uint32
664 Cgid uint32
665 Mode uint32
666 _ [0]uint8
667 Seq uint16
668 _ uint16
669 _ uint64
670 _ uint64
671}
672type SysvShmDesc struct {
673 Perm SysvIpcPerm
674 Segsz uint64
675 Atime int64
676 Dtime int64
677 Ctime int64
678 Cpid int32
679 Lpid int32
680 Nattch uint64
681 _ uint64
682 _ uint64
683}