]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UnixPkg: Added missing EFIAPI for many Gasket functions
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Oct 2010 07:06:28 +0000 (07:06 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Oct 2010 07:06:28 +0000 (07:06 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10923 6f19259b-4bc3-4df7-8a09-765794883524

UnixPkg/Include/Protocol/UnixThunk.h
UnixPkg/Library/DxeUnixLib/UnixLib.c
UnixPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.h
UnixPkg/Sec/Gasket.h
UnixPkg/TimerDxe/Timer.c

index 12d07f931130f82c645cadeb0699f258fc171a41..307da1fa7f154416b4ba8cf12d929b08454aa136 100644 (file)
@@ -2,13 +2,13 @@
 
 Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-This program and the accompanying materials                          
-are licensed and made available under the terms and conditions of the BSD License         
-which accompanies this distribution.  The full text of the license may be found at        
-http://opensource.org/licenses/bsd-license.php                                            
-                                                                                          
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution.  The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 Module Name:
 
@@ -58,7 +58,7 @@ Abstract:
 #else
 #include <termio.h>
 #include <sys/vfs.h>
-#endif 
+#endif
 
 #include <utime.h>
 
@@ -79,21 +79,21 @@ Abstract:
 #if __DARWIN_64_BIT_INO_T
 
 typedef struct stat_fix { \
-       dev_t           st_dev;                 /* [XSI] ID of device containing file */ 
-       mode_t          st_mode;                /* [XSI] Mode of file (see below) */ 
-       nlink_t         st_nlink;               /* [XSI] Number of hard links */ 
-       __darwin_ino64_t st_ino;                /* [XSI] File serial number */ 
-       uid_t           st_uid;                 /* [XSI] User ID of the file */ 
-       gid_t           st_gid;                 /* [XSI] Group ID of the file */ 
-       dev_t           st_rdev;                /* [XSI] Device ID */ 
-       __DARWIN_STRUCT_STAT64_TIMES 
-       off_t           st_size;                /* [XSI] file size, in bytes */ 
-       blkcnt_t        st_blocks;              /* [XSI] blocks allocated for file */ 
-       blksize_t       st_blksize;             /* [XSI] optimal blocksize for I/O */ 
-       __uint32_t      st_flags;               /* user defined flags for file */ 
-       __uint32_t      st_gen;                 /* file generation number */ 
-       __int32_t       st_lspare;              /* RESERVED: DO NOT USE! */ 
-       __int64_t       st_qspare[2];           /* RESERVED: DO NOT USE! */ 
+       dev_t           st_dev;                 /* [XSI] ID of device containing file */
+       mode_t          st_mode;                /* [XSI] Mode of file (see below) */
+       nlink_t         st_nlink;               /* [XSI] Number of hard links */
+       __darwin_ino64_t st_ino;                /* [XSI] File serial number */
+       uid_t           st_uid;                 /* [XSI] User ID of the file */
+       gid_t           st_gid;                 /* [XSI] Group ID of the file */
+       dev_t           st_rdev;                /* [XSI] Device ID */
+       __DARWIN_STRUCT_STAT64_TIMES
+       off_t           st_size;                /* [XSI] file size, in bytes */
+       blkcnt_t        st_blocks;              /* [XSI] blocks allocated for file */
+       blksize_t       st_blksize;             /* [XSI] optimal blocksize for I/O */
+       __uint32_t      st_flags;               /* user defined flags for file */
+       __uint32_t      st_gen;                 /* file generation number */
+       __int32_t       st_lspare;              /* RESERVED: DO NOT USE! */
+       __int64_t       st_qspare[2];           /* RESERVED: DO NOT USE! */
 } STAT_FIX;
 
 #else /* !__DARWIN_64_BIT_INO_T */
@@ -133,7 +133,7 @@ typedef struct stat_fix {
 #pragma pack(4)
 #endif
 
-#else 
+#else
 
   typedef struct stat STAT_FIX;
 
@@ -146,192 +146,192 @@ typedef struct stat_fix {
 
 typedef
 VOID
-(*UnixSleep) (
+(EFIAPI *UnixSleep) (
   unsigned long Milliseconds
   );
 
 typedef
 VOID
-(*UnixExit) (
+(EFIAPI *UnixExit) (
   int status  // exit code for all threads
   );
 
 typedef
 VOID
-(*UnixSetTimer) (
-  UINT64 PeriodMs, 
-  VOID (*CallBack)(UINT64 DeltaMs)
+(EFIAPI *UnixSetTimer) (
+  UINT64 PeriodMs,
+  VOID (EFIAPI *CallBack)(UINT64 DeltaMs)
   );
 
 typedef
 VOID
-(*UnixGetLocalTime) (
+(EFIAPI *UnixGetLocalTime) (
   EFI_TIME *Time
   );
 
 typedef
 struct tm *
-(*UnixGmTime)(
+(EFIAPI *UnixGmTime)(
   const time_t *timep
   );
 
 typedef
 long
-(*UnixGetTimeZone)(
+(EFIAPI *UnixGetTimeZone)(
   void
   );
 
 typedef
 int
-(*UnixGetDayLight)(
+(EFIAPI *UnixGetDayLight)(
   void
   );
 
 typedef
 int
-(*UnixPoll)(
-  struct pollfd *pfd, 
-  unsigned int  nfds, 
+(EFIAPI *UnixPoll)(
+  struct pollfd *pfd,
+  unsigned int  nfds,
   int           timeout
   );
 
 typedef
 long
-(*UnixRead) (
-  int  fd, 
-  void *buf, 
+(EFIAPI *UnixRead) (
+  int  fd,
+  void *buf,
   int  count
   );
 
 typedef
 long
-(*UnixWrite) (
-  int         fd, 
-  const void  *buf, 
+(EFIAPI *UnixWrite) (
+  int         fd,
+  const void  *buf,
   int         count
   );
 
 typedef
 char *
-(*UnixGetenv) (const char *var);
+(EFIAPI *UnixGetenv) (const char *var);
 
 typedef
 int
-(*UnixOpen) (const char *name, int flags, int mode);
+(EFIAPI *UnixOpen) (const char *name, int flags, int mode);
 
 typedef
 off_t
-(*UnixSeek) (int fd, off_t off, int whence);
+(EFIAPI *UnixSeek) (int fd, off_t off, int whence);
 
 typedef
 int
-(*UnixFtruncate) (int fd, long int len);
+(EFIAPI *UnixFtruncate) (int fd, long int len);
 
 typedef
 int
-(*UnixClose) (int fd);
+(EFIAPI *UnixClose) (int fd);
 
 typedef
 int
-(*UnixMkdir)(const char *pathname, mode_t mode);
+(EFIAPI *UnixMkdir)(const char *pathname, mode_t mode);
 
 typedef
 int
-(*UnixRmDir)(const char *pathname);
+(EFIAPI *UnixRmDir)(const char *pathname);
 
 typedef
 int
-(*UnixUnLink)(const char *pathname);
+(EFIAPI *UnixUnLink)(const char *pathname);
 
 typedef
 int
-(*UnixGetErrno)(VOID);
+(EFIAPI *UnixGetErrno)(VOID);
 
 typedef
 DIR *
-(*UnixOpenDir)(const char *pathname);
+(EFIAPI *UnixOpenDir)(const char *pathname);
 
 typedef
 void
-(*UnixRewindDir)(DIR *dir);
+(EFIAPI *UnixRewindDir)(DIR *dir);
 
 typedef
 struct dirent *
-(*UnixReadDir)(DIR *dir);
+(EFIAPI *UnixReadDir)(DIR *dir);
 
 typedef
 int
-(*UnixCloseDir)(DIR *dir);
+(EFIAPI *UnixCloseDir)(DIR *dir);
 
 typedef
 int
-(*UnixStat)(const char *path, STAT_FIX *buf);
+(EFIAPI *UnixStat)(const char *path, STAT_FIX *buf);
 
 typedef
 int
-(*UnixStatFs)(const char *path, struct statfs *buf);
+(EFIAPI *UnixStatFs)(const char *path, struct statfs *buf);
 
 typedef
 int
-(*UnixRename)(const char *oldpath, const char *newpath);
+(EFIAPI *UnixRename)(const char *oldpath, const char *newpath);
 
 typedef
 time_t
-(*UnixMkTime)(struct tm *tm);
+(EFIAPI *UnixMkTime)(struct tm *tm);
 
 typedef
 int
-(*UnixFSync)(int fd);
+(EFIAPI *UnixFSync)(int fd);
 
 typedef
 int
-(*UnixChmod)(const char *path, mode_t mode);
+(EFIAPI *UnixChmod)(const char *path, mode_t mode);
 
 typedef
 int
-(*UnixUTime)(const char *filename, const struct utimbuf *buf);
+(EFIAPI *UnixUTime)(const char *filename, const struct utimbuf *buf);
 
 struct _EFI_UNIX_UGA_IO_PROTOCOL;
 typedef
 EFI_STATUS
-(*UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
+(EFIAPI *UnixUgaCreate)(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,
                 CONST CHAR16 *Title);
 
 typedef
 int
-(*UnixTcflush) (int fildes, int queue_selector);
+(EFIAPI *UnixTcflush) (int fildes, int queue_selector);
 
 typedef
 void
-(*UnixPerror) (__const char *__s);
+(EFIAPI *UnixPerror) (__const char *__s);
 
-typedef 
-int 
+typedef
+int
 #if __CYGWIN__
-(*UnixIoCtl) (int fd, int __request, UINTN Arg);
+(EFIAPI *UnixIoCtl) (int fd, int __request, UINTN Arg);
 #else
-(*UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
+(EFIAPI *UnixIoCtl) (int fd, unsigned long int __request, void *Arg);
 #endif
 
-typedef 
-int 
-(*UnixFcntl) (int __fd, int __cmd, void *Arg);
+typedef
+int
+(EFIAPI *UnixFcntl) (int __fd, int __cmd, void *Arg);
 
 typedef
-int 
-(*UnixCfsetispeed) (struct termios *__termios_p, speed_t __speed);
+int
+(EFIAPI *UnixCfsetispeed) (struct termios *__termios_p, speed_t __speed);
 
-typedef 
-int 
-(*UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);
+typedef
+int
+(EFIAPI *UnixCfsetospeed) (struct termios *__termios_p, speed_t __speed);
 
 typedef
-int 
-(*UnixTcgetattr) (int __fd, struct termios *__termios_p);
+int
+(EFIAPI *UnixTcgetattr) (int __fd, struct termios *__termios_p);
 
-typedef 
-int 
-(*UnixTcsetattr) (int __fd, int __optional_actions,
+typedef
+int
+(EFIAPI *UnixTcsetattr) (int __fd, int __optional_actions,
                      __const struct termios *__termios_p);
 
 
@@ -339,20 +339,20 @@ int
 // Worker functions to enable source level debug in the emulator
 //
 
-typedef 
+typedef
 RETURN_STATUS
 (EFIAPI *UnixPeCoffGetEntryPoint) (
   IN     VOID  *Pe32Data,
   IN OUT VOID  **EntryPoint
   );
 
-typedef 
+typedef
 VOID
 (EFIAPI *UnixPeCoffRelocateImageExtraAction) (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
   );
 
-typedef 
+typedef
 VOID
 (EFIAPI *UnixPeCoffLoaderUnloadImageExtraAction) (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext
@@ -407,8 +407,8 @@ typedef struct _EFI_UNIX_THUNK_PROTOCOL {
   UnixPeCoffGetEntryPoint                 PeCoffGetEntryPoint;
   UnixPeCoffRelocateImageExtraAction      PeCoffRelocateImageExtraAction;
   UnixPeCoffLoaderUnloadImageExtraAction  PeCoffUnloadImageExtraAction;
-       
-       
+
+
 } EFI_UNIX_THUNK_PROTOCOL;
 
 extern EFI_GUID gEfiUnixThunkProtocolGuid;
index c000f7bec2942459491df028d33226c9e16ea7ed..093544889add691f319e1f3c680ab04580e046b4 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  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
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  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
 Module Name:\r
 \r
@@ -15,7 +15,7 @@ Module Name:
 \r
 Abstract:\r
 \r
-  Unix Library \r
+  Unix Library\r
 \r
 --*/\r
 #include "PiDxe.h"\r
@@ -27,6 +27,7 @@ Abstract:
 EFI_UNIX_THUNK_PROTOCOL *gUnix;\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 UnixLibConstructor (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
index b38123cf418df5679d1f3eb3d0046d89206e5058..debd08bc637ea3e56bae5941623ea05c8d6c2851 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  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
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  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
 Module Name:\r
 \r
@@ -109,6 +109,7 @@ extern EFI_HII_HANDLE               mHiiHandle;
 // Prototypes\r
 //\r
 EFI_STATUS\r
+EFIAPI\r
 MiscSubclassDriverEntryPoint (\r
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_SYSTEM_TABLE   *SystemTable\r
index 60a6ab20786eaa563f15f6923eb9acdbc1ef18c3..1b7187035a17cd9b428e1f9564484ef8604cb60d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-  \r
+\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 // Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
 //\r
 \r
-void GasketmsSleep (unsigned long Milliseconds);\r
-void Gasketexit (int status);\r
-void GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs));\r
-void GasketGetLocalTime (EFI_TIME *Time);\r
-struct tm *Gasketgmtime (const time_t *clock);\r
-long GasketGetTimeZone (void);\r
-int GasketGetDayLight (void);\r
-int Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout);\r
-long Gasketread (int fd, void *buf, int count);\r
-long Gasketwrite (int fd, const void *buf, int count);\r
-char *Gasketgetenv (const char *name);\r
-int Gasketopen (const char *name, int flags, int mode);\r
-off_t Gasketlseek (int fd, off_t off, int whence);\r
-int Gasketftruncate (int fd, long int len);\r
-int Gasketclose (int fd);\r
-int Gasketmkdir (const char *pathname, mode_t mode);\r
-int Gasketrmdir (const char *pathname);\r
-int Gasketunlink (const char *pathname);\r
-int GasketGetErrno (void);\r
-DIR *Gasketopendir (const char *pathname);\r
-void Gasketrewinddir (DIR *dir);\r
-struct dirent *Gasketreaddir (DIR *dir);\r
-int Gasketclosedir (DIR *dir);\r
-int Gasketstat (const char *path, STAT_FIX *buf);\r
-int Gasketstatfs (const char *path, struct statfs *buf);\r
-int Gasketrename (const char *oldpath, const char *newpath);\r
-time_t Gasketmktime (struct tm *tm);\r
-int Gasketfsync (int fd);\r
-int Gasketchmod (const char *path, mode_t mode);\r
-int Gasketutime (const char *filename, const struct utimbuf *buf);\r
-int Gaskettcflush (int fildes, int queue_selector);\r
-EFI_STATUS GasketUgaCreate(struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title);\r
-void Gasketperror (__const char *__s);\r
+void\r
+EFIAPI\r
+GasketmsSleep (unsigned long Milliseconds);\r
+\r
+void\r
+EFIAPI\r
+Gasketexit (\r
+  int status\r
+  );\r
+\r
+void\r
+EFIAPI\r
+GasketSetTimer (\r
+  UINT64 PeriodMs,\r
+  VOID (*CallBack)(UINT64 DeltaMs)\r
+  );\r
+\r
+void\r
+EFIAPI\r
+GasketGetLocalTime (\r
+  EFI_TIME *Time\r
+  );\r
+\r
+struct tm *\r
+EFIAPI\r
+Gasketgmtime (\r
+  const time_t *clock\r
+  );\r
+\r
+long\r
+EFIAPI\r
+GasketGetTimeZone (\r
+  void\r
+  );\r
+\r
+int\r
+EFIAPI\r
+GasketGetDayLight (\r
+  void\r
+  );\r
+\r
+\r
+int\r
+EFIAPI\r
+Gasketpoll (\r
+  struct pollfd *pfd,\r
+  unsigned int nfds,\r
+  int timeout\r
+  );\r
+\r
+long\r
+EFIAPI\r
+Gasketread (\r
+  int fd,\r
+  void *buf,\r
+  int count);\r
+\r
+long\r
+EFIAPI\r
+Gasketwrite (\r
+  int fd,\r
+  const void *buf,\r
+  int count\r
+  );\r
+\r
+char *\r
+EFIAPI\r
+Gasketgetenv (\r
+  const char *name\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketopen (\r
+  const char *name,\r
+  int flags,\r
+  int mode\r
+  );\r
+\r
+off_t\r
+EFIAPI\r
+Gasketlseek (\r
+  int fd,\r
+  off_t off,\r
+  int whence\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketftruncate (\r
+  int fd,\r
+  long int len\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketclose (\r
+  int fd\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketmkdir (\r
+  const char *pathname,\r
+  mode_t mode\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketrmdir (\r
+  const char *pathname\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketunlink (\r
+  const char *pathname\r
+  );\r
+\r
+int\r
+EFIAPI\r
+GasketGetErrno (\r
+  void\r
+  );\r
+\r
+DIR *\r
+EFIAPI\r
+Gasketopendir (\r
+  const char *pathname\r
+  );\r
+\r
+void\r
+EFIAPI\r
+Gasketrewinddir (\r
+  DIR *dir\r
+  );\r
+\r
+struct dirent *\r
+EFIAPI\r
+Gasketreaddir (\r
+  DIR *dir\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketclosedir (\r
+  DIR *dir\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketstat (const char *path, STAT_FIX *buf);\r
+\r
+int\r
+EFIAPI\r
+Gasketstatfs (const char *path, struct statfs *buf);\r
+\r
+int\r
+EFIAPI\r
+Gasketrename (\r
+  const char *oldpath,\r
+  const char *newpath\r
+  );\r
+\r
+time_t\r
+EFIAPI\r
+Gasketmktime (\r
+  struct tm *tm\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketfsync (\r
+  int fd\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketchmod (\r
+  const char *path,\r
+  mode_t mode\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketutime (\r
+  const char *filename,\r
+  const struct utimbuf *buf\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gaskettcflush (\r
+  int fildes,\r
+  int queue_selector\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaCreate (\r
+  struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo,\r
+  CONST CHAR16 *Title\r
+  );\r
+\r
+void\r
+EFIAPI\r
+Gasketperror (\r
+  __const char *__s\r
+  );\r
 \r
 //\r
 // ... is always an int or pointer to device specific data structure\r
 //\r
-int Gasketioctl (int fd, unsigned long int __request, void *Arg);\r
-int Gasketfcntl (int __fd, int __cmd, void *Arg);\r
 \r
-int Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed);\r
-int Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed);\r
-int Gaskettcgetattr (int __fd, struct termios *__termios_p); \r
-int Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p);\r
-int Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact);\r
+int\r
+EFIAPI\r
+Gasketioctl (\r
+  int fd,\r
+  unsigned long int __request,\r
+  void *Arg\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketfcntl (\r
+  int __fd,\r
+  int __cmd,\r
+  void *Arg\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketcfsetispeed (\r
+  struct termios *__termios_p,\r
+  speed_t __speed\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketcfsetospeed (\r
+  struct termios *__termios_p,\r
+  speed_t __speed\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gaskettcgetattr (\r
+  int __fd,\r
+  struct termios *__termios_p\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gaskettcsetattr (\r
+  int __fd,\r
+  int __optional_actions,\r
+  __const struct termios *__termios_p\r
+  );\r
+\r
+int\r
+EFIAPI\r
+Gasketsigaction (\r
+  int sig,\r
+  const struct sigaction *act,\r
+  struct sigaction *oact\r
+  );\r
 \r
 RETURN_STATUS\r
+EFIAPI\r
 GasketUnixPeCoffGetEntryPoint (\r
   IN     VOID  *Pe32Data,\r
   IN OUT VOID  **EntryPoint\r
   );\r
 \r
 VOID\r
+EFIAPI\r
 GasketUnixPeCoffRelocateImageExtraAction (\r
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   );\r
 \r
 VOID\r
+EFIAPI\r
 GasketUnixPeCoffUnloadImageExtraAction (\r
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   );\r
-  \r
 \r
-UINTN GasketVoid (void *api);\r
-UINTN GasketUintn (void *api, UINTN a);\r
-UINTN GasketUintnUintn (void *api, UINTN a, UINTN b);\r
-UINTN GasketUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c);\r
-UINTN GasketUintnUintnUintnUintn (void *api, UINTN a, UINTN b, UINTN c, UINTN d);\r
-UINTN GasketUintn10Args (void *api, UINTN a, UINTN b, UINTN c, UINTN d, UINTN e, UINTN f, UINTN g, UINTN h, UINTN i, UINTN j);\r
-UINTN GasketUint64Uintn (void *api, UINT64 a, UINTN b);\r
-UINT64 GasketUintnUint64Uintn (void *api, UINTN a, UINT64 b, UINTN c);\r
-UINTN GasketUintnUint16 (void *api, UINTN a, UINT16 b);\r
 \r
-typedef void (*CALL_BACK) (UINT64 Delta);\r
 \r
-UINTN ReverseGasketUint64 (CALL_BACK CallBack, UINT64 a);\r
+UINTN\r
+EFIAPI\r
+GasketVoid (\r
+  void *api\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintn (\r
+  void *api,\r
+  UINTN a\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintnUintn (\r
+  void *api,\r
+  UINTN a,\r
+  UINTN b\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintnUintnUintn (\r
+  void *api,\r
+  UINTN a,\r
+  UINTN b,\r
+  UINTN c\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintnUintnUintnUintn (\r
+  void *api,\r
+  UINTN a,\r
+  UINTN b,\r
+  UINTN c,\r
+  UINTN d\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintn10Args (\r
+  void *api,\r
+  UINTN a,\r
+  UINTN b,\r
+  UINTN c,\r
+  UINTN d,\r
+  UINTN e,\r
+  UINTN f,\r
+  UINTN g,\r
+  UINTN h,\r
+  UINTN i,\r
+  UINTN j\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUint64Uintn (\r
+  void *api,\r
+  UINT64 a,\r
+  UINTN b);\r
+\r
+UINT64\r
+EFIAPI\r
+GasketUintnUint64Uintn (\r
+  void *api,\r
+  UINTN a,\r
+  UINT64 b,\r
+  UINTN c\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+GasketUintnUint16 (\r
+  void *api,\r
+  UINTN a,\r
+  UINT16 b\r
+  );\r
+\r
+typedef\r
+void\r
+(*CALL_BACK) (\r
+  UINT64 Delta\r
+  );\r
+\r
+UINTN\r
+ReverseGasketUint64 (\r
+  CALL_BACK CallBack,\r
+  UINT64 a\r
+  );\r
 \r
 //\r
 // Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
 //\r
 \r
-EFI_STATUS EFIAPI GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS EFIAPI GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
-EFI_STATUS EFIAPI GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS EFIAPI GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
-EFI_STATUS EFIAPI GasketUgaBlt (\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaClose (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaSize (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  UINT32 Width,\r
+  UINT32 Height\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaCheckKey (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaGetKey (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  EFI_INPUT_KEY *key\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GasketUgaBlt (\r
    EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
    IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
    IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
@@ -124,26 +453,57 @@ EFI_STATUS EFIAPI GasketUgaBlt (
    IN  UINTN                                   Delta OPTIONAL\r
    );\r
 \r
-EFI_STATUS UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title);\r
+EFI_STATUS\r
+EFIAPI\r
+UgaCreate (\r
+  EFI_UNIX_UGA_IO_PROTOCOL **Uga,\r
+  CONST CHAR16 *Title\r
+  );\r
 \r
 \r
 //\r
 // Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
 //\r
-EFI_STATUS UgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS UgaSize(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height);\r
-EFI_STATUS UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo);\r
-EFI_STATUS UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key);\r
-EFI_STATUS UgaBlt (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
-       IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
-       IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-       IN  UINTN                                   SourceX,\r
-       IN  UINTN                                   SourceY,\r
-       IN  UINTN                                   DestinationX,\r
-       IN  UINTN                                   DestinationY,\r
-       IN  UINTN                                   Width,\r
-       IN  UINTN                                   Height,\r
-       IN  UINTN                                   Delta OPTIONAL\r
+EFI_STATUS\r
+EFIAPI\r
+UgaClose (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UgaSize(\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  UINT32 Width,\r
+  UINT32 Height\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UgaCheckKey(\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UgaGetKey (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  EFI_INPUT_KEY *key\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UgaBlt (\r
+  EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
+  IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
+  IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
+  IN  UINTN                                   SourceX,\r
+  IN  UINTN                                   SourceY,\r
+  IN  UINTN                                   DestinationX,\r
+  IN  UINTN                                   DestinationY,\r
+  IN  UINTN                                   Width,\r
+  IN  UINTN                                   Height,\r
+  IN  UINTN                                   Delta OPTIONAL\r
   );\r
 \r
 \r
index 16105df9bd0262054fa612414a754a2477d9f852..385db630dbb6342e9ec4afecba330276b9804f6e 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials                          \r
-are licensed and made available under the terms and conditions of the BSD License         \r
-which accompanies this distribution.  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
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  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
 Module Name:\r
 \r
@@ -18,7 +18,7 @@ Abstract:
   UNIX Emulation Timer Architectural Protocol Driver as defined in DXE CIS\r
 \r
   This Timer module uses an UNIX Thread to simulate the timer-tick driven\r
-  timer service.  In the future, the Thread creation should possibly be \r
+  timer service.  In the future, the Thread creation should possibly be\r
   abstracted by the CPU architectural protocol\r
 \r
 --*/\r
@@ -62,6 +62,7 @@ UINT64                  mTimerPeriodMs;
 \r
 \r
 VOID\r
+EFIAPI\r
 TimerCallback (UINT64 DeltaMs)\r
 /*++\r
 \r
@@ -115,38 +116,38 @@ UnixTimerDriverRegisterHandler (
 \r
 Routine Description:\r
 \r
-  This function registers the handler NotifyFunction so it is called every time \r
-  the timer interrupt fires.  It also passes the amount of time since the last \r
-  handler call to the NotifyFunction.  If NotifyFunction is NULL, then the \r
-  handler is unregistered.  If the handler is registered, then EFI_SUCCESS is \r
-  returned.  If the CPU does not support registering a timer interrupt handler, \r
-  then EFI_UNSUPPORTED is returned.  If an attempt is made to register a handler \r
-  when a handler is already registered, then EFI_ALREADY_STARTED is returned.  \r
-  If an attempt is made to unregister a handler when a handler is not registered, \r
-  then EFI_INVALID_PARAMETER is returned.  If an error occurs attempting to \r
-  register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR \r
+  This function registers the handler NotifyFunction so it is called every time\r
+  the timer interrupt fires.  It also passes the amount of time since the last\r
+  handler call to the NotifyFunction.  If NotifyFunction is NULL, then the\r
+  handler is unregistered.  If the handler is registered, then EFI_SUCCESS is\r
+  returned.  If the CPU does not support registering a timer interrupt handler,\r
+  then EFI_UNSUPPORTED is returned.  If an attempt is made to register a handler\r
+  when a handler is already registered, then EFI_ALREADY_STARTED is returned.\r
+  If an attempt is made to unregister a handler when a handler is not registered,\r
+  then EFI_INVALID_PARAMETER is returned.  If an error occurs attempting to\r
+  register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR\r
   is returned.\r
 \r
 Arguments:\r
 \r
   This           - The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  NotifyFunction - The function to call when a timer interrupt fires.  This \r
-                   function executes at TPL_HIGH_LEVEL.  The DXE Core will \r
-                   register a handler for the timer interrupt, so it can know \r
-                   how much time has passed.  This information is used to \r
+  NotifyFunction - The function to call when a timer interrupt fires.  This\r
+                   function executes at TPL_HIGH_LEVEL.  The DXE Core will\r
+                   register a handler for the timer interrupt, so it can know\r
+                   how much time has passed.  This information is used to\r
                    signal timer based events.  NULL will unregister the handler.\r
 \r
-Returns: \r
+Returns:\r
 \r
   EFI_SUCCESS           - The timer handler was registered.\r
 \r
   EFI_UNSUPPORTED       - The platform does not support timer interrupts.\r
 \r
-  EFI_ALREADY_STARTED   - NotifyFunction is not NULL, and a handler is already \r
+  EFI_ALREADY_STARTED   - NotifyFunction is not NULL, and a handler is already\r
                           registered.\r
 \r
-  EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not \r
+  EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not\r
                           previously registered.\r
 \r
   EFI_DEVICE_ERROR      - The timer handler could not be registered.\r
@@ -186,30 +187,30 @@ UnixTimerDriverSetTimerPeriod (
 \r
 Routine Description:\r
 \r
-  This function adjusts the period of timer interrupts to the value specified \r
-  by TimerPeriod.  If the timer period is updated, then the selected timer \r
-  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If \r
-  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.  \r
-  If an error occurs while attempting to update the timer period, then the \r
-  timer hardware will be put back in its state prior to this call, and \r
-  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt \r
-  is disabled.  This is not the same as disabling the CPU's interrupts.  \r
-  Instead, it must either turn off the timer hardware, or it must adjust the \r
-  interrupt controller so that a CPU interrupt is not generated when the timer \r
-  interrupt fires. \r
+  This function adjusts the period of timer interrupts to the value specified\r
+  by TimerPeriod.  If the timer period is updated, then the selected timer\r
+  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If\r
+  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.\r
+  If an error occurs while attempting to update the timer period, then the\r
+  timer hardware will be put back in its state prior to this call, and\r
+  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt\r
+  is disabled.  This is not the same as disabling the CPU's interrupts.\r
+  Instead, it must either turn off the timer hardware, or it must adjust the\r
+  interrupt controller so that a CPU interrupt is not generated when the timer\r
+  interrupt fires.\r
 \r
 Arguments:\r
 \r
   This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  TimerPeriod - The rate to program the timer interrupt in 100 nS units.  If \r
-                the timer hardware is not programmable, then EFI_UNSUPPORTED is \r
-                returned.  If the timer is programmable, then the timer period \r
-                will be rounded up to the nearest timer period that is supported \r
-                by the timer hardware.  If TimerPeriod is set to 0, then the \r
+  TimerPeriod - The rate to program the timer interrupt in 100 nS units.  If\r
+                the timer hardware is not programmable, then EFI_UNSUPPORTED is\r
+                returned.  If the timer is programmable, then the timer period\r
+                will be rounded up to the nearest timer period that is supported\r
+                by the timer hardware.  If TimerPeriod is set to 0, then the\r
                 timer interrupts will be disabled.\r
 \r
-Returns: \r
+Returns:\r
 \r
   EFI_SUCCESS      - The timer period was changed.\r
 \r
@@ -245,19 +246,19 @@ UnixTimerDriverGetTimerPeriod (
 \r
 Routine Description:\r
 \r
-  This function retrieves the period of timer interrupts in 100 ns units, \r
-  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod \r
-  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is \r
+  This function retrieves the period of timer interrupts in 100 ns units,\r
+  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod\r
+  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is\r
   returned, then the timer is currently disabled.\r
 \r
 Arguments:\r
 \r
   This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  TimerPeriod - A pointer to the timer period to retrieve in 100 ns units.  If \r
+  TimerPeriod - A pointer to the timer period to retrieve in 100 ns units.  If\r
                 0 is returned, then the timer is currently disabled.\r
 \r
-Returns: \r
+Returns:\r
 \r
   EFI_SUCCESS           - The timer period was returned in TimerPeriod.\r
 \r
@@ -283,19 +284,19 @@ UnixTimerDriverGenerateSoftInterrupt (
 \r
 Routine Description:\r
 \r
-  This function generates a soft timer interrupt. If the platform does not support soft \r
-  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned. \r
-  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler() \r
-  service, then a soft timer interrupt will be generated. If the timer interrupt is \r
-  enabled when this service is called, then the registered handler will be invoked. The \r
-  registered handler should not be able to distinguish a hardware-generated timer \r
+  This function generates a soft timer interrupt. If the platform does not support soft\r
+  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.\r
+  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()\r
+  service, then a soft timer interrupt will be generated. If the timer interrupt is\r
+  enabled when this service is called, then the registered handler will be invoked. The\r
+  registered handler should not be able to distinguish a hardware-generated timer\r
   interrupt from a software-generated timer interrupt.\r
 \r
 Arguments:\r
 \r
   This  -  The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-Returns: \r
+Returns:\r
 \r
   EFI_SUCCESS       - The soft timer interrupt was generated.\r
 \r
@@ -329,7 +330,7 @@ Returns:
   EFI_SUCCESS           - Timer Architectural Protocol created\r
 \r
   EFI_OUT_OF_RESOURCES  - Not enough resources available to initialize driver.\r
-  \r
+\r
   EFI_DEVICE_ERROR      - A device error occured attempting to initialize the driver.\r
 \r
 --*/\r