| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-11-06 | std: remove lock wrappers in `sys_common` | joboet | -50/+0 | |
| 2022-10-13 | std: use `sync::Mutex` for internal statics | joboet | -44/+0 | |
| 2022-06-27 | make Condvar, Mutex, RwLock const constructors work with unsupported impl | Jorge Aparicio | -0/+1 | |
| 2022-06-20 | Remove lies in comments. | Mara Bos | -4/+3 | |
| 2022-06-06 | Make {Mutex, Condvar, RwLock}::new() const. | Mara Bos | -1/+1 | |
| 2022-06-06 | Make all {Mutex, Condvar, RwLock}::new #[inline]. | Mara Bos | -0/+2 | |
| 2022-06-03 | Lazily allocate+initialize locks. | Mara Bos | -3/+1 | |
| 2022-06-03 | Use Drop instead of destroy() for locks. | Mara Bos | -6/+0 | |
| 2022-03-21 | Move pthread locks to own module. | Mara Bos | -1/+1 | |
| 2020-10-14 | Remove lifetime from StaticMutex and assume 'static. | Mara Bos | -12/+5 | |
| StaticMutex is only ever used with as a static (as the name already suggests). So it doesn't have to be generic over a lifetime, but can simply assume 'static. This 'static lifetime guarantees the object is never moved, so this is no longer a manually checked requirement for unsafe calls to lock(). | ||||
| 2020-10-14 | Fix comment about non-reentrant StaticMutex::lock(). | Mara Bos | -2/+3 | |
| The comment said it's UB to call lock() while it is locked. That'd be quite a useless Mutex. :) It was supposed to say 'locked by the same thread', not just 'locked'. | ||||
| 2020-10-08 | Remove unnecessary rustc_const_stable attributes. | Mara Bos | -1/+0 | |
| 2020-10-02 | Make it possible to have unboxed mutexes on specific platforms. | Mara Bos | -4/+5 | |
| This commit keeps all mutexes boxed on all platforms, but makes it trivial to remove the box on some platforms later. | ||||
| 2020-10-02 | Move boxing and mutex checking logic of condvar into sys_common. | Mara Bos | -1/+1 | |
| 2020-09-27 | Split sys_common::Mutex in StaticMutex and MovableMutex. | Mara Bos | -61/+66 | |
| The (unsafe) Mutex from sys_common had a rather complicated interface. You were supposed to call init() manually, unless you could guarantee it was neither moved nor used reentrantly. Calling `destroy()` was also optional, although it was unclear if 1) resources might be leaked or not, and 2) if destroy() should only be called when `init()` was called. This allowed for a number of interesting (confusing?) different ways to use this Mutex, all captured in a single type. In practice, this type was only ever used in two ways: 1. As a static variable. In this case, neither init() nor destroy() are called. The variable is never moved, and it is never used reentrantly. It is only ever locked using the LockGuard, never with raw_lock. 2. As a Boxed variable. In this case, both init() and destroy() are called, it will be moved and possibly used reentrantly. No other combinations are used anywhere in `std`. This change simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. The interface of both new types is now both safer and simpler. The first one does not call nor expose init/destroy, and the second one calls those automatically in its new() and Drop functions. Also, the locking functions of MovableMutex are no longer unsafe. | ||||
| 2020-07-27 | mv std libs to library/ | mark | -0/+101 | |
