sync: add a package doc

This commit is contained in:
Nia Waldvogel
2021-12-20 13:03:36 -05:00
committed by Nia
parent 5e719b0d3d
commit f21fdd1f76
2 changed files with 4 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
// Package sync implements synchronization primitives similar to those provided by the standard Go implementation.
// These are not safe to access from within interrupts, or from another thread.
// The primitives also lack any fairness guarantees, similar to channels and the scheduler.
package sync
-2
View File
@@ -5,8 +5,6 @@ import (
_ "unsafe"
)
// These mutexes assume there is only one thread of operation and cannot be accessed safely from interrupts.
type Mutex struct {
locked bool
blocked task.Stack