VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/StdLib/BsdSocketLib/poll.c@ 77775

Last change on this file since 77775 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/** @file
2 Implement the poll API.
3
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.
9
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.
12**/
13#include <SocketInternals.h>
14
15
16/** Poll the socket for activity
17
18 @param [in] pDescriptor Descriptor address for the file
19 @param [in] Events Mask of events to detect
20
21 @return Detected events for the socket
22 **/
23short
24EFIAPI
25BslSocketPoll (
26 IN struct __filedes * pDescriptor,
27 IN short Events
28 )
29{
30 short DetectedEvents;
31 EFI_SOCKET_PROTOCOL * pSocketProtocol;
32
33 // Locate the socket protocol
34 DetectedEvents = 0;
35 pSocketProtocol = BslValidateSocketFd ( pDescriptor, &errno );
36 if ( NULL != pSocketProtocol ) {
37 // Poll the socket
38 (void) pSocketProtocol->pfnPoll ( pSocketProtocol,
39 Events,
40 &DetectedEvents,
41 &errno );
42 }
43 // Return the detected events
44 return DetectedEvents;
45}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette