/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * Copyright (c) 2026-present Eclipse ThreadX contributors * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** ThreadX Component */ /** */ /** Module */ /** */ /**************************************************************************/ /**************************************************************************/ #define TXM_MODULE #include "txm_module.h" #ifndef TXM_SEMAPHORE_CEILING_PUT_CALL_NOT_USED /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _txe_semaphore_ceiling_put PORTABLE C */ /* 6.1.10 */ /* AUTHOR */ /* */ /* Scott Larson, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors in the semaphore ceiling put */ /* function call. */ /* */ /* INPUT */ /* */ /* semaphore_ptr Pointer to semaphore */ /* ceiling Maximum value of semaphore */ /* */ /* OUTPUT */ /* */ /* TX_SEMAPHORE_ERROR Invalid semaphore pointer */ /* TX_INVALID_CEILING Invalid semaphore ceiling */ /* status Actual completion status */ /* */ /* CALLS */ /* */ /* _txm_module_kernel_call_dispatcher */ /* */ /* CALLED BY */ /* */ /* Module application code */ /* */ /**************************************************************************/ UINT _txe_semaphore_ceiling_put(TX_SEMAPHORE *semaphore_ptr, ULONG ceiling) { UINT return_value; /* Call module manager dispatcher. */ return_value = (UINT) (_txm_module_kernel_call_dispatcher)(TXM_SEMAPHORE_CEILING_PUT_CALL, (ALIGN_TYPE) semaphore_ptr, (ALIGN_TYPE) ceiling, 0); /* Return value to the caller. */ return(return_value); } #endif