+++ /dev/null
-/** @file\r
- Implement the poll API.\r
-\r
- Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials are licensed and made available under\r
- the terms and conditions of the BSD License that accompanies this distribution.\r
- The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-#include <SocketInternals.h>\r
-\r
-\r
-/** Poll the socket for activity\r
-\r
- @param [in] pDescriptor Descriptor address for the file\r
- @param [in] Events Mask of events to detect\r
-\r
- @return Detected events for the socket\r
- **/\r
-short\r
-EFIAPI\r
-BslSocketPoll (\r
- IN struct __filedes * pDescriptor,\r
- IN short Events\r
- )\r
-{\r
- short DetectedEvents;\r
- EFI_SOCKET_PROTOCOL * pSocketProtocol;\r
-\r
- // Locate the socket protocol\r
- DetectedEvents = 0;\r
- pSocketProtocol = BslValidateSocketFd ( pDescriptor, &errno );\r
- if ( NULL != pSocketProtocol ) {\r
- // Poll the socket\r
- (void) pSocketProtocol->pfnPoll ( pSocketProtocol,\r
- Events,\r
- &DetectedEvents,\r
- &errno );\r
- }\r
- // Return the detected events\r
- return DetectedEvents;\r
-}\r