forked from nuttx/nuttx-update
graphics/, libnx/: Disable priority inheritance on all semaphores used for signaling
This commit is contained in:
parent
d28181da10
commit
77a0b6c26a
3 changed files with 23 additions and 53 deletions
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* nuttx/graphics/nxterm/nxterm_register.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -48,22 +48,11 @@
|
|||
#include <debug.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include "nxterm.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -104,7 +93,12 @@ FAR struct nxterm_state_s *
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||
/* The waitsem semaphore is used for signaling and, hence, should not have
|
||||
* priority inheritance enabled.
|
||||
*/
|
||||
|
||||
sem_init(&priv->waitsem, 0, 0);
|
||||
sem_setprotocol(&priv->waitsem, SEM_PRIO_NONE);
|
||||
#endif
|
||||
|
||||
/* Select the font */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* libnx/nxmu/nx_bitmap.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2009, 2011-2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -46,25 +46,7 @@
|
|||
#include <nuttx/nx/nxbe.h>
|
||||
#include <nuttx/nx/nxmu.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
@ -137,6 +119,12 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* The sem_done semaphore is used for signaling and, hence, should not have
|
||||
* priority inheritance enabled.
|
||||
*/
|
||||
|
||||
(void)sem_setprotocol(&sem_done, SEM_PRIO_NONE);
|
||||
|
||||
/* Forward the fill command to the server */
|
||||
|
||||
ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_bitmap_s));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* libnx/nxmu/nx_getrectangle.c
|
||||
*
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -47,25 +47,7 @@
|
|||
#include <nuttx/nx/nxbe.h>
|
||||
#include <nuttx/nx/nxmu.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
#include <nuttx/semaphore.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
@ -131,6 +113,12 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* The sem_done semaphore is used for signaling and, hence, should not have
|
||||
* priority inheritance enabled.
|
||||
*/
|
||||
|
||||
(void)sem_setprotocol(&sem_done, SEM_PRIO_NONE);
|
||||
|
||||
/* Forward the fill command to the server */
|
||||
|
||||
ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_getrectangle_s));
|
||||
|
|
Loading…
Reference in a new issue