* Simulator magic is not supported in user mode under Linux. * This version of simprintf simply calls the underlying C * library printf for output. It also makes sure that two * calls to simprintf provide atomic output. * * @param format Format string in the same format as printf. */
| 135 | * @param format Format string in the same format as printf. |
| 136 | */ |
| 137 | void simprintf(const char *format, ...) |
| 138 | { |
| 139 | CVMX_SHARED static cvmx_spinlock_t simprintf_lock = CVMX_SPINLOCK_UNLOCKED_INITIALIZER; |
| 140 | va_list ap; |
| 141 | |
| 142 | cvmx_spinlock_lock(&simprintf_lock); |
| 143 | printf("SIMPRINTF(%d): ", (int)cvmx_get_core_num()); |
| 144 | va_start(ap, format); |
| 145 | vprintf(format, ap); |
| 146 | va_end(ap); |
| 147 | cvmx_spinlock_unlock(&simprintf_lock); |
| 148 | } |
| 149 | |
| 150 | |
| 151 | /** |
nothing calls this directly
no test coverage detected