...

Source file src/runtime/os2_plan9.go

     1	// Copyright 2010 The Go Authors. All rights reserved.
     2	// Use of this source code is governed by a BSD-style
     3	// license that can be found in the LICENSE file.
     4	
     5	// Plan 9-specific system calls
     6	
     7	package runtime
     8	
     9	// open
    10	const (
    11		_OREAD   = 0
    12		_OWRITE  = 1
    13		_ORDWR   = 2
    14		_OEXEC   = 3
    15		_OTRUNC  = 16
    16		_OCEXEC  = 32
    17		_ORCLOSE = 64
    18		_OEXCL   = 0x1000
    19	)
    20	
    21	// rfork
    22	const (
    23		_RFNAMEG  = 1 << 0
    24		_RFENVG   = 1 << 1
    25		_RFFDG    = 1 << 2
    26		_RFNOTEG  = 1 << 3
    27		_RFPROC   = 1 << 4
    28		_RFMEM    = 1 << 5
    29		_RFNOWAIT = 1 << 6
    30		_RFCNAMEG = 1 << 10
    31		_RFCENVG  = 1 << 11
    32		_RFCFDG   = 1 << 12
    33		_RFREND   = 1 << 13
    34		_RFNOMNT  = 1 << 14
    35	)
    36	
    37	// notify
    38	const (
    39		_NCONT = 0
    40		_NDFLT = 1
    41	)
    42	
    43	type uinptr _Plink
    44	
    45	type tos struct {
    46		prof struct { // Per process profiling
    47			pp    *_Plink // known to be 0(ptr)
    48			next  *_Plink // known to be 4(ptr)
    49			last  *_Plink
    50			first *_Plink
    51			pid   uint32
    52			what  uint32
    53		}
    54		cyclefreq uint64 // cycle clock frequency if there is one, 0 otherwise
    55		kcycles   int64  // cycles spent in kernel
    56		pcycles   int64  // cycles spent in process (kernel + user)
    57		pid       uint32 // might as well put the pid here
    58		clock     uint32
    59		// top of stack is here
    60	}
    61	
    62	const (
    63		_NSIG   = 14  // number of signals in sigtable array
    64		_ERRMAX = 128 // max length of note string
    65	
    66		// Notes in runtimeĀ·sigtab that are handled by runtimeĀ·sigpanic.
    67		_SIGRFAULT = 2
    68		_SIGWFAULT = 3
    69		_SIGINTDIV = 4
    70		_SIGFLOAT  = 5
    71		_SIGTRAP   = 6
    72		_SIGPROF   = 0 // dummy value defined for badsignal
    73		_SIGQUIT   = 0 // dummy value defined for sighandler
    74	)
    75	

View as plain text