Changeset 31e15be in mainline for kernel/generic/include


Ignore:
Timestamp:
2021-08-04T15:18:08Z (4 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
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)
Message:

kernel: deprecate atomic_t

Location:
kernel/generic/include
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/atomic.h

    rde38873 r31e15be  
    4040#include <stdatomic.h>
    4141
    42 // TODO: Remove.
    43 // Before <stdatomic.h> was available, there was only one atomic type
    44 // equivalent to atomic_size_t. This means that in some places, atomic_t can
    45 // be replaced with a more appropriate type (e.g. atomic_bool for flags or
    46 // a signed type for potentially signed values).
    47 // So atomic_t should be replaced with the most appropriate type on a case by
    48 // case basis, and after there are no more uses, remove this type.
    49 typedef atomic_size_t atomic_t;
    50 
    5142#define atomic_predec(val) \
    5243        (atomic_fetch_sub((val), 1) - 1)
  • kernel/generic/include/cap/cap.h

    rde38873 r31e15be  
    8080typedef struct kobject {
    8181        kobject_type_t type;
    82         atomic_t refcnt;
     82        atomic_size_t refcnt;
    8383
    8484        /** Mutex protecting caps_list */
  • kernel/generic/include/cpu.h

    rde38873 r31e15be  
    5858        context_t saved_context;
    5959
    60         atomic_t nrdy;
     60        atomic_size_t nrdy;
    6161        runq_t rq[RQ_COUNT];
    6262        volatile size_t needs_relink;
  • kernel/generic/include/halt.h

    rde38873 r31e15be  
    3838#include <atomic.h>
    3939
    40 extern atomic_t haltstate;
     40extern atomic_bool haltstate;
    4141
    4242extern void halt(void) __attribute__((noreturn));
  • kernel/generic/include/ipc/ipc.h

    rde38873 r31e15be  
    7171        struct call *hangup_call;
    7272        ipc_phone_state_t state;
    73         atomic_t active_calls;
     73        atomic_size_t active_calls;
    7474        /** User-defined label */
    7575        sysarg_t label;
     
    9090         * Number of answers the answerbox is expecting to eventually arrive.
    9191         */
    92         atomic_t active_calls;
     92        atomic_size_t active_calls;
    9393
    9494        /** Phones connected to this answerbox. */
  • kernel/generic/include/mm/slab.h

    rde38873 r31e15be  
    9999
    100100        /* 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;
    104104        /** How many magazines in magazines list */
    105         atomic_t magazine_counter;
     105        atomic_size_t magazine_counter;
    106106
    107107        /* Slabs */
  • kernel/generic/include/proc/scheduler.h

    rde38873 r31e15be  
    5252} runq_t;
    5353
    54 extern atomic_t nrdy;
     54extern atomic_size_t nrdy;
    5555extern void scheduler_init(void);
    5656
  • kernel/generic/include/proc/task.h

    rde38873 r31e15be  
    8787
    8888        /** Number of references (i.e. threads). */
    89         atomic_t refcount;
     89        atomic_size_t refcount;
    9090        /** Number of threads that haven't exited yet. */
    91         atomic_t lifecount;
     91        atomic_size_t lifecount;
    9292
    9393        /** Task permissions. */
Note: See TracChangeset for help on using the changeset viewer.