source: rtems/cpukit/posix/src/psignalsetprocesssignals.c @ 127c20eb

5
Last change on this file since 127c20eb was 93306058, checked in by Sebastian Huber <sebastian.huber@…>, on 05/27/16 at 12:43:19

score: _CORE_mutex_Check_dispatch_for_seize()

Move the safety check performed by
_CORE_mutex_Check_dispatch_for_seize() out of the performance critical
path and generalize it. Blocking on a thread queue with an unexpected
thread dispatch disabled level is illegal in all system states.

Add the expected thread dispatch disable level (which may be 1 or 2
depending on the operation) to Thread_queue_Context and use it in
_Thread_queue_Enqueue_critical().

  • Property mode set to 100644
File size: 1010 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief POSIX Signals Set Process Signals
5 *  @ingroup POSIX_SIGNALS
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <errno.h>
22#include <pthread.h>
23#include <signal.h>
24
25#include <rtems/system.h>
26#include <rtems/score/isr.h>
27#include <rtems/score/thread.h>
28#include <rtems/score/wkspace.h>
29#include <rtems/seterr.h>
30#include <rtems/posix/threadsup.h>
31#include <rtems/posix/psignalimpl.h>
32#include <rtems/posix/pthreadimpl.h>
33#include <stdio.h>
34
35void _POSIX_signals_Set_process_signals(
36  sigset_t   mask
37)
38{
39  Thread_queue_Context queue_context;
40
41  _Thread_queue_Context_initialize( &queue_context );
42  _POSIX_signals_Acquire( &queue_context );
43    _POSIX_signals_Pending |= mask;
44  _POSIX_signals_Release( &queue_context );
45}
Note: See TracBrowser for help on using the repository browser.