Fix an PIC32 error in scheduling of signal handlers

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4229 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2011-12-26 16:24:43 +00:00
parent 49a51cb0f1
commit 8f88c268c2
10 changed files with 50 additions and 32 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_completejoin.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -83,7 +83,7 @@ static bool pthread_notifywaiters(FAR join_t *pjoin)
int ntasks_waiting;
int status;
sdbg("pjoin=0x%p\n", pjoin);
svdbg("pjoin=0x%p\n", pjoin);
/* Are any tasks waiting for our exit value? */
@@ -148,7 +148,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
{
FAR join_t *pjoin;
sdbg("process_id=%d exit_value=%p\n", pid, exit_value);
svdbg("pid=%d exit_value=%p\n", pid, exit_value);
/* First, find thread's structure in the private data set. */
@@ -156,7 +156,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value)
pjoin = pthread_findjoininfo(pid);
if (!pjoin)
{
sdbg("Could not find join info, pid=%d\n", pid);
(void)pthread_givesemaphore(&g_join_semaphore);
return ERROR;
}
+5 -3
View File
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_exit.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,7 +45,9 @@
#include <pthread.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>
#include "pthread_internal.h"
/************************************************************************
@@ -111,7 +113,7 @@ void pthread_exit(FAR void *exit_value)
status = pthread_completejoin(getpid(), exit_value);
if (status != OK)
{
/* Assume that the join completion failured becuase this
/* Assume that the join completion failured because this
* not really a pthread. Exit by calling exit() to flush
* and close all file descriptors and calling atexit()
* functions.
+2 -2
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* pthread_join.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+4 -4
View File
@@ -1,8 +1,8 @@
/************************************************************************
* sched/pthread_kill.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -83,11 +83,11 @@ int pthread_kill(pthread_t thread, int signo)
{
int ret;
*get_errno_ptr() = EINVAL;
set_errno(EINVAL);
ret = kill((pid_t)thread, signo);
if (ret != OK)
{
ret = *get_errno_ptr();
ret = get_errno();
}
return ret;
}
+1 -1
View File
@@ -2,7 +2,7 @@
* sched/sig_kill.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
+1 -1
View File
@@ -2,7 +2,7 @@
* sched/sig_received.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions