From: Arun Thomas Date: Tue, 2 Aug 2011 13:24:47 +0000 (+0200) Subject: kernel: don't build cprofile code by default X-Git-Tag: v3.2.0~391 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/mdoc.3.txt?a=commitdiff_plain;h=d69519f86a7accb605502f9427ba0deec894182d;p=minix.git kernel: don't build cprofile code by default --- diff --git a/kernel/system.h b/kernel/system.h index e34106d55..e69d47a67 100644 --- a/kernel/system.h +++ b/kernel/system.h @@ -195,6 +195,10 @@ _PROTOTYPE( int do_sprofile, (struct proc * caller, message *m_ptr) ); _PROTOTYPE( int do_cprofile, (struct proc * caller, message *m_ptr) ); _PROTOTYPE( int do_profbuf, (struct proc * caller, message *m_ptr) ); +#if ! CPROFILE +#define do_cprofile NULL +#define do_profbuf NULL +#endif _PROTOTYPE( int do_getmcontext, (struct proc * caller, message *m_ptr) ); _PROTOTYPE( int do_setmcontext, (struct proc * caller, message *m_ptr) ); diff --git a/kernel/system/do_cprofile.c b/kernel/system/do_cprofile.c index c01d39133..22cf82b0d 100644 --- a/kernel/system/do_cprofile.c +++ b/kernel/system/do_cprofile.c @@ -16,6 +16,8 @@ #include +#if CPROFILE + /*===========================================================================* * do_cprofile * *===========================================================================*/ @@ -144,3 +146,4 @@ PUBLIC int do_cprofile(struct proc * caller, message * m_ptr) } } +#endif /* CPROFILE */ diff --git a/kernel/system/do_profbuf.c b/kernel/system/do_profbuf.c index 7b87df016..e62bac0b7 100644 --- a/kernel/system/do_profbuf.c +++ b/kernel/system/do_profbuf.c @@ -11,6 +11,8 @@ #include "kernel/system.h" +#if CPROFILE + /*===========================================================================* * do_profbuf * *===========================================================================*/ @@ -45,4 +47,5 @@ PUBLIC int do_profbuf(struct proc * caller, message * m_ptr) return OK; } +#endif /* CPROFILE */