Browse files

libbase: add abort()

  • Loading branch information...
1 parent 6f8f96b commit 7414dcaeed3fdb00fa4eb8b9ced32bd23b2d9615 @sbourdeauducq sbourdeauducq committed Oct 1, 2011
Showing with 9 additions and 2 deletions.
  1. +2 −1 software/include/base/stdlib.h
  2. +7 −1 software/libbase/libc.c
View
3 software/include/base/stdlib.h
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2011 Sebastien Bourdeauducq
* Copyright (C) Linux kernel developers
*
* 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);
float atof(const char *s);
unsigned int rand();
+void abort();
void *malloc(size_t size);
void free(void *p);
View
8 software/libbase/libc.c
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq
* Copyright (C) Linus Torvalds and Linux kernel developers
*
* This program is free software: you can redistribute it and/or modify
@@ -569,3 +569,9 @@ unsigned int rand()
seed = 129 * seed + 907633385;
return seed;
}
+
+void abort()
+{
+ printf("Aborted.");
+ while(1);
+}

0 comments on commit 7414dca

Please sign in to comment.