From 4206c6e3fc783329ec36b67975b308d61a0de546 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Mon, 1 Jun 2009 15:06:07 +0300 Subject: [PATCH 1/2] An extra mutex_unlock has been removed --- src/api/mutex.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/api/mutex.c b/src/api/mutex.c index b0dd958..ef3d482 100644 --- a/src/api/mutex.c +++ b/src/api/mutex.c @@ -199,7 +199,6 @@ int mutex_control_unlock(unsigned long mutex_address) /* Search for the mutex queue */ if (!(mutex_queue = mutex_control_find(mutex_address))) { - mutex_queue_head_unlock(); /* No such mutex, create one and sleep on it */ if (!(mutex_queue = mutex_control_create(mutex_address))) { From 87eae2c9412fee55f0e8cab88c70bdc95a99dab3 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Mon, 1 Jun 2009 15:07:24 +0300 Subject: [PATCH 2/2] Verbose error reporting on execve test. --- tasks/test0/src/exectest.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tasks/test0/src/exectest.c b/tasks/test0/src/exectest.c index dcc5cbd..b810185 100644 --- a/tasks/test0/src/exectest.c +++ b/tasks/test0/src/exectest.c @@ -16,7 +16,7 @@ extern char _end_test_exec[]; int exectest(void) { - int fd; + int fd, err; void *exec_start = (void *)_start_test_exec; unsigned long size = _end_test_exec - _start_test_exec; int left, cnt; @@ -28,6 +28,7 @@ int exectest(void) /* First create a new file and write the executable data to that file */ if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IRWXU)) < 0) { + err = errno; test_printf("OPEN: %d\n", errno); goto out_err; } @@ -40,7 +41,7 @@ int exectest(void) left -= cnt; } - if (close(fd) < 0) + if ((err = close(fd)) < 0) goto out_err; /* Set up some arguments */ @@ -51,9 +52,10 @@ int exectest(void) argv[4] = 0; /* Execute the file */ - execve(filename, argv, 0); + err = execve(filename, argv, 0); out_err: + printf("EXECVE failed with %d\n", err); printf("EXECVE TEST -- FAILED --\n"); return 0; }