aboutsummaryrefslogtreecommitdiff
path: root/include/assert.h
blob: c36679f8f70ec006cb8cfd3daed04b50401563fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef __ASSERT_H__
#define __ASSERT_H__

#include <stdio.h>

static __inline void __assert(int Cond)
{
#ifdef _DEBUG
  if (!Cond)
  {
    printf("assertion occured.\n");
    __asm int 3;
    while (1);
  }
#endif
}

#define assert(Cond) __assert((int)(Cond))

#endif