]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Change to common header file not applicable to open-vm-tools.
authorKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:44 +0000 (09:05 -0700)
committerKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:44 +0000 (09:05 -0700)
open-vm-tools/lib/include/userlock.h

index b58b6630555d31378ca65359a424ae6fd3e317e2..043077509b1cb6f538477519f9c6d8f26de5ef9d 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (C) 2009-2020 VMware, Inc. All rights reserved.
+ * Copyright (c) 2009-2024 Broadcom. All rights reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
 extern "C" {
 #endif
 
-typedef struct MXUserExclLock   MXUserExclLock;
-typedef struct MXUserRecLock    MXUserRecLock;
-typedef struct MXUserRWLock     MXUserRWLock;
-typedef struct MXUserRankLock   MXUserRankLock;
-typedef struct MXUserCondVar    MXUserCondVar;
-typedef struct MXUserSemaphore  MXUserSemaphore;
-typedef struct MXUserEvent      MXUserEvent;
-typedef struct MXUserBarrier    MXUserBarrier;
+typedef struct MXUserExclLock      MXUserExclLock;
+typedef struct MXUserRecLock       MXUserRecLock;
+typedef struct MXUserRWLock        MXUserRWLock;
+typedef struct MXUserRankLock      MXUserRankLock;
+typedef struct MXUserCondVar       MXUserCondVar;
+typedef struct MXUserSemaphore     MXUserSemaphore;
+typedef struct MXUserBinSemaphore  MXUserBinSemaphore;
+typedef struct MXUserEvent         MXUserEvent;
+typedef struct MXUserBarrier       MXUserBarrier;
 
 /*
  * Exclusive ownership lock
@@ -270,6 +272,23 @@ MXUserSemaphore *MXUser_CreateSingletonSemaphore(Atomic_Ptr *semaStorage,
                                                  const char *name,
                                                  MX_Rank rank);
 
+/*
+ * Binary semaphore
+ */
+
+MXUserBinSemaphore *MXUser_CreateBinSemaphore(const char *name,
+                                              MX_Rank rank);
+
+void MXUser_DestroyBinSemaphore(MXUserBinSemaphore *binSema);
+void MXUser_UpBinSemaphore(MXUserBinSemaphore *binSema);
+void MXUser_DownBinSemaphore(MXUserBinSemaphore *binSema);
+Bool MXUser_TryDownBinSemaphore(MXUserBinSemaphore *binSema);
+
+Bool MXUser_TimedDownBinSemaphore(MXUserBinSemaphore *binSema,
+                                  uint32 waitTimeMS);
+Bool MXUser_TimedDownBinSemaphoreNS(MXUserBinSemaphore *binSema,
+                                    uint64 waitTimeNS);
+
 /*
  * Rank lock
  *