* thread, nor can it be called from interrupt context or with interrupts
* disabled.
*
- * @param btwritten On success, the number of return addresses written is stored
- * here.
+ * @param error The precise error code that occurred is stored here, or 0 if no
+ * error occurred.
*
* @param user64 On success, true is stored here if user space was running in
* 64-bit mode, and false is stored otherwise.
*
- * @return Returns 0 on success and an errno value on error.
+ * @param was_truncated true is stored here if the full stack could not be written
+ * to bt.
+ *
+ * @return Returns the number of frames written to bt.
*
* @seealso backtrace
*/
-int backtrace_user(uintptr_t *bt, unsigned int btlen, unsigned int *btwritten,
+unsigned int backtrace_user(uintptr_t *bt, unsigned int btlen, int *error,
bool *user64, bool *was_truncated);
/*
*
* @see backtrace_user
*/
-int backtrace_thread_user(void *thread, uintptr_t *bt, unsigned int btlen,
- unsigned int *btwritten, bool *user64, bool *was_truncated);
+unsigned int backtrace_thread_user(void *thread, uintptr_t *bt,
+ unsigned int btlen, int *error, bool *user64, bool *was_truncated);
__END_DECLS