diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 17:48:17 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 17:48:17 +0100 |
| commit | e3b0df6ae2a5cd1f98400f671c374b5955bd0bcc (patch) | |
| tree | 1aa8346d564da8d08097dd4eec3b5216877b036c /src/kernel/NeKit/Atom.h | |
| parent | 878919d80864301328f3e9c471fe2dce2a8ea61d (diff) | |
chore: kernel: specs fixes and kernel API impl improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit/Atom.h')
| -rw-r--r-- | src/kernel/NeKit/Atom.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h index 9d6e9f24..3dedea32 100644 --- a/src/kernel/NeKit/Atom.h +++ b/src/kernel/NeKit/Atom.h @@ -1,13 +1,14 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/nekernel-org/nekernel -#ifndef __NE_KIT_ATOM_H__ -#define __NE_KIT_ATOM_H__ +#ifndef NEKIT_ATOM_H +#define NEKIT_ATOM_H #include <NeKit/Config.h> namespace Kernel { + template <class TypeAtomic> class Atom final { public: @@ -24,6 +25,7 @@ class Atom final { const TypeAtomic& operator[](const SizeT& bit) { return (fArrayOfAtoms & (1 << bit)); } void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); } + Atom& operator|=(const SizeT& bit) { this->operator|(bit); return *this; @@ -39,6 +41,7 @@ class Atom final { private: TypeAtomic fArrayOfAtoms; }; + } // namespace Kernel #endif |
