diff --git a/src/sync/doc.go b/src/sync/doc.go new file mode 100644 index 000000000..77f30f939 --- /dev/null +++ b/src/sync/doc.go @@ -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 diff --git a/src/sync/mutex.go b/src/sync/mutex.go index 0f272ad7c..e12bf40c1 100644 --- a/src/sync/mutex.go +++ b/src/sync/mutex.go @@ -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