projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69b1ac0
)
syscalls: support identifiers iteration
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 19 Sep 2023 17:13:21 +0000
(20:13 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 19 Sep 2023 18:30:03 +0000
(21:30 +0300)
src/openpower/syscalls/__init__.py
patch
|
blob
|
history
diff --git
a/src/openpower/syscalls/__init__.py
b/src/openpower/syscalls/__init__.py
index 053e45f3d10fcb2b3213614ca327f92430c70b69..569655d27f81ace89f142da478c758bf0684f59e 100644
(file)
--- a/
src/openpower/syscalls/__init__.py
+++ b/
src/openpower/syscalls/__init__.py
@@
-54,6
+54,12
@@
class Dispatcher:
return super().__init__()
+ def __iter__(self):
+ identifiers = sorted(map(int, filter(str.isnumeric, self.__guest)))
+ for identifier in identifiers:
+ entry = self.__guest[str(identifier)][1][0]
+ yield (identifier, entry)
+
def __getitem__(self, identifier):
if not isinstance(identifier, int):
raise ValueError(identifier)