threadprofileinit.c
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/************************************************************************
Copyright (C) 1999 NINTENDO CO,Ltd,
Copyright (C) 1999 MONEGI CORPORATION,
All Rights Reserved
This program is a trade secret of NINTENDO CO,Ltd and MONEGI Corp.
and it is not to be reproduced, published, disclosed to others, copied,
adapted, distributed, or displayed without the prior authorization of
NINTENDO CO,Ltd. and MONEGI Corp. Licensee agrees to attach or embed
this Notice on all copies of the program, including partial copies or
modified versions thereof.
*************************************************************************/
/************************************************************************
$Date: 2002/10/29 08:06:43 $
$Revision: 1.1.1.1 $
$Author: blythe $
************************************************************************/
#ifndef _FINALROM
#include <rdb.h>
#include <os_internal.h>
#include <os_thread.h>
#include "osint.h"
/*
* プロファイラを初期化する
* 最初に一度必ず実行しなくてはならない
*/
void
osThreadProfileInit(void)
{
register u32 saveMask;
OSId i;
saveMask = __osDisableInt();
__osThprofFunc = NULL;
__osThprofFlag = 1; /* Init 実行フラグ */
__osThprofCount = 0;
__osThprofStack = &__osThprofHeap[THPROF_STACKSIZE/sizeof(u64) - 1];
__osRestoreInt(saveMask);
for(i=0;i<THPROF_IDMAX;i++){
osThreadProfileClear(i);
}
}
#endif /* #ifndef _FINALROM */