Changeset 31e15be in mainline for kernel/generic
- Timestamp:
- 2021-08-04T15:18:08Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98a935e
- Parents:
- de38873
- git-author:
- Dmitry Selyutin <ghostmansd@…> (2020-12-23 21:59:08)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-08-04 15:18:08)
- Location:
- kernel/generic
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/atomic.h
rde38873 r31e15be 40 40 #include <stdatomic.h> 41 41 42 // TODO: Remove.43 // Before <stdatomic.h> was available, there was only one atomic type44 // equivalent to atomic_size_t. This means that in some places, atomic_t can45 // be replaced with a more appropriate type (e.g. atomic_bool for flags or46 // a signed type for potentially signed values).47 // So atomic_t should be replaced with the most appropriate type on a case by48 // case basis, and after there are no more uses, remove this type.49 typedef atomic_size_t atomic_t;50 51 42 #define atomic_predec(val) \ 52 43 (atomic_fetch_sub((val), 1) - 1) -
kernel/generic/include/cap/cap.h
rde38873 r31e15be 80 80 typedef struct kobject { 81 81 kobject_type_t type; 82 atomic_ t refcnt;82 atomic_size_t refcnt; 83 83 84 84 /** Mutex protecting caps_list */ -
kernel/generic/include/cpu.h
rde38873 r31e15be 58 58 context_t saved_context; 59 59 60 atomic_ t nrdy;60 atomic_size_t nrdy; 61 61 runq_t rq[RQ_COUNT]; 62 62 volatile size_t needs_relink; -
kernel/generic/include/halt.h
rde38873 r31e15be 38 38 #include <atomic.h> 39 39 40 extern atomic_ thaltstate;40 extern atomic_bool haltstate; 41 41 42 42 extern void halt(void) __attribute__((noreturn)); -
kernel/generic/include/ipc/ipc.h
rde38873 r31e15be 71 71 struct call *hangup_call; 72 72 ipc_phone_state_t state; 73 atomic_ t active_calls;73 atomic_size_t active_calls; 74 74 /** User-defined label */ 75 75 sysarg_t label; … … 90 90 * Number of answers the answerbox is expecting to eventually arrive. 91 91 */ 92 atomic_ t active_calls;92 atomic_size_t active_calls; 93 93 94 94 /** Phones connected to this answerbox. */ -
kernel/generic/include/mm/slab.h
rde38873 r31e15be 99 99 100 100 /* Statistics */ 101 atomic_ t allocated_slabs;102 atomic_ t allocated_objs;103 atomic_ t cached_objs;101 atomic_size_t allocated_slabs; 102 atomic_size_t allocated_objs; 103 atomic_size_t cached_objs; 104 104 /** How many magazines in magazines list */ 105 atomic_ t magazine_counter;105 atomic_size_t magazine_counter; 106 106 107 107 /* Slabs */ -
kernel/generic/include/proc/scheduler.h
rde38873 r31e15be 52 52 } runq_t; 53 53 54 extern atomic_ t nrdy;54 extern atomic_size_t nrdy; 55 55 extern void scheduler_init(void); 56 56 -
kernel/generic/include/proc/task.h
rde38873 r31e15be 87 87 88 88 /** Number of references (i.e. threads). */ 89 atomic_ t refcount;89 atomic_size_t refcount; 90 90 /** Number of threads that haven't exited yet. */ 91 atomic_ t lifecount;91 atomic_size_t lifecount; 92 92 93 93 /** Task permissions. */ -
kernel/generic/src/lib/halt.c
rde38873 r31e15be 36 36 */ 37 37 38 #include <stdbool.h> 38 39 #include <halt.h> 39 40 #include <log.h> … … 44 45 45 46 /** Halt flag */ 46 atomic_ t haltstate = 0;47 atomic_bool haltstate = false; 47 48 48 49 /** Halt wrapper … … 57 58 58 59 if (!atomic_load(&haltstate)) { 59 atomic_store(&haltstate, 1);60 atomic_store(&haltstate, true); 60 61 rundebugger = true; 61 62 } 62 63 #else 63 atomic_store(&haltstate, 1);64 atomic_store(&haltstate, true); 64 65 #endif 65 66 -
kernel/generic/src/proc/scheduler.c
rde38873 r31e15be 68 68 static void scheduler_separated_stack(void); 69 69 70 atomic_ t nrdy; /**< Number of ready threads in the system. */70 atomic_size_t nrdy; /**< Number of ready threads in the system. */ 71 71 72 72 /** Carry out actions before new task runs. */
Note:
See TracChangeset
for help on using the changeset viewer.