Embedded C code - functions that might sleep

Turgis, Frederic f-turgis@ti.com
Wed Feb 1 12:28:00 GMT 2012


Hi,

systemtap doc states: "Note that all SystemTap functions and probes run with interrupts disabled, thus you cannot call functions that might sleep within the embedded C."

This would explain issues we get with below probe on ARM platform (OMAP):
- open a GP timer through function that calls mutex_lock() in "begin" probe -> it gives "BUG: sleeping function called from invalid context".

Do you confirm interpretation and what can we do ? This would not be used in production so use it with a risk of lock ?


Note that I think I have similar issue with "iounmap" embedded C in "end" probe but I must re-setup a platform to double check error I recently got.


Regards
Fred

Frederic Turgis

OMAP Platform Business Unit - OMAP System Engineering - Platform Enablement - System Multimedia


Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920




More information about the Systemtap mailing list