]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/BsdSocketLib/poll.c
2 Implement the poll API.
4 Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #include <SocketInternals.h>
16 /** Poll the socket for activity
18 @param [in] pDescriptor Descriptor address for the file
19 @param [in] Events Mask of events to detect
21 @return Detected events for the socket
26 IN
struct __filedes
* pDescriptor
,
31 EFI_SOCKET_PROTOCOL
* pSocketProtocol
;
33 // Locate the socket protocol
35 pSocketProtocol
= BslValidateSocketFd ( pDescriptor
, &errno
);
36 if ( NULL
!= pSocketProtocol
) {
38 (void) pSocketProtocol
->pfnPoll ( pSocketProtocol
,
43 // Return the detected events
44 return DetectedEvents
;