aboutsummaryrefslogtreecommitdiff
path: root/include/assert.h
blob: 8004c4badb926c88f28628674d68524e43b8fba6 (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