From f21fdd1f76a082c127220cefbd3c6161d19e5d0e Mon Sep 17 00:00:00 2001 From: Nia Waldvogel Date: Mon, 20 Dec 2021 13:03:36 -0500 Subject: [PATCH] sync: add a package doc --- src/sync/doc.go | 4 ++++ src/sync/mutex.go | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/sync/doc.go diff --git a/src/sync/doc.go b/src/sync/doc.go new file mode 100644 index 00000000..77f30f93 --- /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 0f272ad7..e12bf40c 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