summaryrefslogtreecommitdiff
path: root/tests/test_stack.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-09-21 15:28:07 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-09-21 15:28:07 +0400
commitf8a7e9922e625c56ce3e4781495bd0ff15a2857e (patch)
treeae437e3df4e113188d7331780109e5753458be3d /tests/test_stack.c
parent30ab2d5d6e3cb323410a5f1782cc80ef68bd400f (diff)
parent49a5fa61ad919162bff1d11c71f3d09a68166271 (diff)
downloadlibatomic_ops-f8a7e9922e625c56ce3e4781495bd0ff15a2857e.tar.gz
Apply hotfix-7_2a6-2 to the current release
Diffstat (limited to 'tests/test_stack.c')
-rw-r--r--tests/test_stack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_stack.c b/tests/test_stack.c
index 9b2e7b2..3a92d12 100644
--- a/tests/test_stack.c
+++ b/tests/test_stack.c
@@ -68,7 +68,7 @@ void add_elements(int n)
if (le == 0)
{
fprintf(stderr, "Out of memory\n");
- abort();
+ exit(2);
}
le -> data = n;
AO_stack_push(&the_list, (AO_t *)le);
@@ -203,12 +203,12 @@ int main(int argc, char **argv)
ops_performed = 0;
start_time = get_msecs();
for (i = 1; i < nthreads; ++i) {
- int code;
+ int code;
if ((code = pthread_create(thread+i, 0, run_one_test,
(void *)(long)i)) != 0) {
fprintf(stderr, "Thread creation failed %u\n", code);
- exit(1);
+ exit(3);
}
}
/* We use the main thread to run one test. This allows gprof */