Skip to content

Commit

Permalink
aarch64+x64 squash: PR suggestions
Browse files Browse the repository at this point in the history
Tweak *Structs_B comments and add a comment for TcbFlags

Signed-off-by: Corey Lewis <[email protected]>
  • Loading branch information
corlewis committed Dec 18, 2024
1 parent de4b958 commit df62557
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/design/skel/AARCH64/Arch_Structs_B.thy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*)

(* Architecture-specific data types shared by spec and abstract. *)
(* Architecture-specific data types shared by design and abstract specs. *)

chapter "Common, Architecture-Specific Data Types"

Expand Down
2 changes: 1 addition & 1 deletion spec/design/skel/Structs_B.thy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*)

(* Generic data types shared by spec and abstract. *)
(* Generic data types shared by design and abstract specs. *)

chapter "Common, Generic Data Types"

Expand Down
2 changes: 1 addition & 1 deletion spec/design/skel/X64/Arch_Structs_B.thy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*)

(* Architecture-specific data types shared by spec and abstract. *)
(* Architecture-specific data types shared by design and abstract specs. *)

chapter "Common, Architecture-Specific Data Types"

Expand Down
12 changes: 7 additions & 5 deletions spec/haskell/src/SEL4/Object/Structures.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,17 @@ Various operations on the free index of an Untyped cap.

\subsubsection{TCB Flags}

> type TcbFlags = Word

> noFlag :: TcbFlags
> noFlag = 0x0

> data TcbFlag = ArchFlag ArchTcbFlag

> tcbFlagToWord :: TcbFlag -> Word
> tcbFlagToWord (ArchFlag archFlag) = archTcbFlagToWord archFlag

Sets of TCB flags are bitwise OR'd and represented as a word.

> type TcbFlags = Word

> noFlag :: TcbFlags
> noFlag = 0x0

> isFlagSet :: TcbFlag -> TcbFlags -> Bool
> isFlagSet flag flags = tcbFlagToWord flag .&. flags /= 0

0 comments on commit df62557

Please sign in to comment.