Added ARM archictecture detection to avoid the native call error when RDTSC used #227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During a development with an Arm device and using Netmq, the device send an exception related to the use of a native call using mmap and the RDTSC instructions for x86. The problem is RDTSC don't exist in the ARM instructions set(must use a cycle counter at kernel leve in linux). This happens when you implements a poller.
I applied a workaround, detecting if NetMQ is running in an Arm device, set the RSTSC delegate to a function that returns the current tick count that mono(and .Net) provides. I am planning to implement the native call in asm for the cycle counter but in this moment seems to be a little more complex for my current knowledge, but i am working on it.
The required asm calls are documented in this asm codefile:
https://github.com/prabindh/peemuperf/blob/master/v7_pmu.S
I tested the change in two devices, one is a custom Arm board with ubuntu 12.04 and the last version of mono compiled in the device. Also in a raspberry Pi.
Thanks