OSSetThreadCleanupCallback

Syntax

#include <cafe/os.h>

typedef void (*OSThreadCleanupCallback)(void* thread, void* stackEnd);

OSThreadCleanupCallback OSSetThreadCleanupCallback (OSThread* thread,
                                                    OSThreadCleanupCallback callback);

Parameters

thread Pointer to thread.
callback Pointer to callback.

Return Values

The function pointer to the previously set callback.

Description

Registers the callback to run immediately before the thread terminates. The callback runs right before the thread terminates using the thread stack. The thread structure and thread stack end (stack base - stack size) pointer are provided as callback arguments.

Do Not Call From

None.

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup pass.
2011/11/28 Initial version.


CONFIDENTIAL