Changeset 694ca93f in mainline for uspace/lib/c/generic/assert.c


Ignore:
Timestamp:
2011-05-01T19:34:26Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e26444
Parents:
1ff896e (diff), 042fbe0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/assert.c

    r1ff896e r694ca93f  
    11/*
    2  * Copyright (c) 2010 Martin Decky
     2 * Copyright (c) 2011 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup abs32le
     29/** @addtogroup libc
    3030 * @{
    3131 */
    32 /** @file
    33  */
    3432
    35 #ifndef KERN_abs32le_MEMSTR_H_
    36 #define KERN_abs32le_MEMSTR_H_
     33#include <assert.h>
     34#include <stdio.h>
     35#include <stdlib.h>
     36#include <stacktrace.h>
    3737
    38 #define memcpy(dst, src, cnt)   _memcpy((dst), (src), (cnt))
    39 #define memsetb(dst, cnt, val)  _memsetb((dst), (cnt), (val))
    40 #define memsetw(dst, cnt, val)  _memsetw((dst), (cnt), (val))
    41 
    42 #endif
     38void assert_abort(const char *cond, const char *file, unsigned int line)
     39{
     40        printf("Assertion failed (%s) in file \"%s\", line %u.\n",
     41            cond, file, line);
     42        stacktrace_print();
     43        abort();
     44}
    4345
    4446/** @}
Note: See TracChangeset for help on using the changeset viewer.