Skip to content

Commit

Permalink
Restore linux_api's GETTID for ARM targets
Browse files Browse the repository at this point in the history
This is a follow-up commit to 643b912
which fixed SeattleTestbed#98 (GETTID on MIPS) but broke it
for ARMs at the same time. GETTID's syscall number on ARM is identical
with x86_32's, or so my testing on a Raspberry Pi Model B Rev 2 with
BCM2835 SoC with an ARM CPU core indicates.

This commit also adds raising an exception to signal that we have no
GETTID number in case we are running on a platform other than
x86_32/64, MIPS, or ARM.
  • Loading branch information
aaaaalbert committed Jul 20, 2017
1 parent b32e38f commit cd64452
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion linux_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ def _get_machine_GETTID_number():
GETTID = 224
elif machine.startswith("mips"):
GETTID = 4222
# TODO Needs ARM and possibly other clauses!
elif machine.startswith("arm"):
GETTID = 224
else:
raise Exception("I don't know the GETTID syscall number for machine '" +
machine + "' with architecture '" + architecture + "'.")
return GETTID

GETTID = _get_machine_GETTID_number()
Expand Down

0 comments on commit cd64452

Please sign in to comment.