C utility functions for micro support