From: Kruti Date: Fri, 3 May 2024 16:05:44 +0000 (-0700) Subject: Change to common header file not applicable to open-vm-tools. X-Git-Tag: stable-12.5.0~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2d1f8c418c72f21f0ef44a83262d19e0f68185e;p=thirdparty%2Fopen-vm-tools.git Change to common header file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/userlock.h b/open-vm-tools/lib/include/userlock.h index b58b66305..043077509 100644 --- a/open-vm-tools/lib/include/userlock.h +++ b/open-vm-tools/lib/include/userlock.h @@ -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 @@ -35,14 +36,15 @@ 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 *