Revert "Set num_threads to 50 on 32-bit hppa in two libgomp loop tests"
[official-gcc.git] / libgo / go / sync / runtime.go
blobde2b0a3ccd2af523429aa8abdcd8db65ecd21d33
1 // Copyright 2012 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.
5 package sync
7 import "unsafe"
9 // defined in package runtime
11 // Semacquire waits until *s > 0 and then atomically decrements it.
12 // It is intended as a simple sleep primitive for use by the synchronization
13 // library and should not be used directly.
14 func runtime_Semacquire(s *uint32)
16 // SemacquireMutex is like Semacquire, but for profiling contended Mutexes.
17 // If lifo is true, queue waiter at the head of wait queue.
18 // skipframes is the number of frames to omit during tracing, counting from
19 // runtime_SemacquireMutex's caller.
20 func runtime_SemacquireMutex(s *uint32, lifo bool, skipframes int)
22 // Semrelease atomically increments *s and notifies a waiting goroutine
23 // if one is blocked in Semacquire.
24 // It is intended as a simple wakeup primitive for use by the synchronization
25 // library and should not be used directly.
26 // If handoff is true, pass count directly to the first waiter.
27 // skipframes is the number of frames to omit during tracing, counting from
28 // runtime_Semrelease's caller.
29 func runtime_Semrelease(s *uint32, handoff bool, skipframes int)
31 // See runtime/sema.go for documentation.
32 func runtime_notifyListAdd(l *notifyList) uint32
34 // See runtime/sema.go for documentation.
35 func runtime_notifyListWait(l *notifyList, t uint32)
37 // See runtime/sema.go for documentation.
38 func runtime_notifyListNotifyAll(l *notifyList)
40 // See runtime/sema.go for documentation.
41 func runtime_notifyListNotifyOne(l *notifyList)
43 // Ensure that sync and runtime agree on size of notifyList.
44 func runtime_notifyListCheck(size uintptr)
45 func init() {
46 var n notifyList
47 runtime_notifyListCheck(unsafe.Sizeof(n))
50 // Active spinning runtime support.
51 // runtime_canSpin reports whether spinning makes sense at the moment.
52 func runtime_canSpin(i int) bool
54 // runtime_doSpin does active spinning.
55 func runtime_doSpin()
57 func runtime_nanotime() int64