1
0
mirror of https://github.com/azure-rtos/threadx synced 2025-02-06 08:08:27 +08:00

86 lines
4.9 KiB
C
Raw Normal View History

2020-09-30 15:42:41 -07:00
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
2021-06-02 06:45:05 +00:00
/** */
/** POSIX wrapper for THREADX */
2020-09-30 15:42:41 -07:00
/** */
/** */
/** */
/**************************************************************************/
/**************************************************************************/
/* Include necessary system files. */
2021-06-02 06:45:05 +00:00
#include "tx_api.h" /* Threadx API */
#include "pthread.h" /* Posix API */
#include "px_int.h" /* Posix helper functions */
#include "tx_thread.h" /* Internal ThreadX thread management. */
2020-09-30 15:42:41 -07:00
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
2021-06-02 06:45:05 +00:00
/* sigemptyset PORTABLE C */
2021-07-28 07:24:02 +00:00
/* 6.1.7 */
2020-09-30 15:42:41 -07:00
/* AUTHOR */
/* */
/* William E. Lamie, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
2021-06-02 06:45:05 +00:00
/* This function initializes the signal set pointed to by 'set' to 0. */
2020-09-30 15:42:41 -07:00
/* */
/* INPUT */
/* */
2021-06-02 06:45:05 +00:00
/* set Pointer to set of signals */
2020-09-30 15:42:41 -07:00
/* */
/* OUTPUT */
/* */
2021-06-02 06:45:05 +00:00
/* OK If successful */
/* ERROR If error occurs */
2020-09-30 15:42:41 -07:00
/* */
/* CALLS */
/* */
2021-06-02 06:45:05 +00:00
/* posix_set_pthread_errno */
2020-09-30 15:42:41 -07:00
/* */
/* CALLED BY */
/* */
/* Application Code */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
2021-07-28 07:24:02 +00:00
/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */
2020-09-30 15:42:41 -07:00
/* */
/**************************************************************************/
2021-06-02 06:45:05 +00:00
int sigemptyset(sigset_t *set)
{
2020-09-30 15:42:41 -07:00
2021-06-02 06:45:05 +00:00
/* Is there a pointer. */
if (!set)
{
/* Return an error. */
posix_set_pthread_errno(EINVAL);
return(ERROR);
}
2020-09-30 15:42:41 -07:00
2021-06-02 06:45:05 +00:00
/* Set the signal set to 0, which is the empty set. */
set -> signal_set = 0;
2020-09-30 15:42:41 -07:00
2021-06-02 06:45:05 +00:00
/* Return successful status. */
return(OK);
}