Interrupts are disabled for every jprobe call: not for the entire sequence.
How many calls do you expect when the application processes them? There are different approaches depending on how fast you expect calls to come. The simplest method, if you expect maybe a few hundred calls before you can process them and you dedicate static memory to the goal, is to implement a static array of rename_obj_t objects in memory, and then use atomic_add from the asm kernel to point to next entry (resize your array).
This way you return a unique static reference every time until the counter wraps before processing the return values. atomic_add guaranteed to have the right memory barriers, so you donβt have to worry about things like cache consistency.
Daniel Wisehart
source share