Skip to content

Commit 7414dca

Browse files
author
Sebastien Bourdeauducq
committedOct 1, 2011
libbase: add abort()
1 parent 6f8f96b commit 7414dca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
 

‎software/include/base/stdlib.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Milkymist SoC (Software)
3-
* Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
3+
* Copyright (C) 2007, 2008, 2009, 2011 Sebastien Bourdeauducq
44
* Copyright (C) Linux kernel developers
55
*
66
* This program is free software: you can redistribute it and/or modify
@@ -50,6 +50,7 @@ long strtol(const char *nptr, char **endptr, int base);
5050
float atof(const char *s);
5151

5252
unsigned int rand();
53+
void abort();
5354

5455
void *malloc(size_t size);
5556
void free(void *p);

‎software/libbase/libc.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Milkymist SoC (Software)
3-
* Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
3+
* Copyright (C) 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq
44
* Copyright (C) Linus Torvalds and Linux kernel developers
55
*
66
* This program is free software: you can redistribute it and/or modify
@@ -569,3 +569,9 @@ unsigned int rand()
569569
seed = 129 * seed + 907633385;
570570
return seed;
571571
}
572+
573+
void abort()
574+
{
575+
printf("Aborted.");
576+
while(1);
577+
}

0 commit comments

Comments
 (0)
Please sign in to comment.