anchao commented on code in PR #12802: URL: https://github.com/apache/nuttx/pull/12802#discussion_r1703263174
########## sched/event/event_wait.c: ########## @@ -0,0 +1,213 @@ +/**************************************************************************** + * sched/event/event_wait.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/event.h> +#include <nuttx/sched.h> + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nxevent_tickwait + * + * Description: + * Wait for all of the specified events from the specified tick time. + * + * This routine waits on event object event until any of the specified + * events have been delivered to the event object, or the maximum wait time + * timeout has expired. A thread may wait on up to 32 distinctly numbered + * events that are expressed as bits in a single 32-bit word. + * + * Input Parameters: + * event - Address of the event object + * events - Set of events to post to event + * - Set events to 0 will indicate wait from any events + * delay - Ticks to wait from the start time until the event is + * posted. If ticks is zero, then this function is equivalent + * to nxevent_trywait(). + * + * Returned Value: + * This is an internal OS interface and should not be used by applications. + * Return of matching events upon success. + * 0 if matching events were not received within the specified time. + * + ****************************************************************************/ + +static nxevent_mask_t nxevent_wait_internal(FAR nxevent_t *event, Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
