mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Removed the (rather pointless) granularity value from the array objects. Converted a few macros into functions and other misc code clean-ups.
This commit is contained in:
parent
c368805559
commit
97035bb3a1
69 changed files with 218 additions and 369 deletions
|
|
@ -416,12 +416,6 @@ const String juce_getOutputFromCommand (const String& command)
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_64BIT
|
||||
#define filedesc ((long long) internal)
|
||||
#else
|
||||
#define filedesc ((int) internal)
|
||||
#endif
|
||||
|
||||
InterProcessLock::InterProcessLock (const String& name_)
|
||||
: internal (0),
|
||||
name (name_),
|
||||
|
|
@ -436,7 +430,7 @@ InterProcessLock::InterProcessLock (const String& name_)
|
|||
|
||||
temp.create();
|
||||
|
||||
internal = (void*) open (temp.getFullPathName().toUTF8(), O_RDWR);
|
||||
internal = open (temp.getFullPathName().toUTF8(), O_RDWR);
|
||||
}
|
||||
|
||||
InterProcessLock::~InterProcessLock()
|
||||
|
|
@ -444,7 +438,7 @@ InterProcessLock::~InterProcessLock()
|
|||
while (reentrancyLevel > 0)
|
||||
this->exit();
|
||||
|
||||
close (filedesc);
|
||||
close (internal);
|
||||
}
|
||||
|
||||
bool InterProcessLock::enter (const int timeOutMillisecs)
|
||||
|
|
@ -464,7 +458,7 @@ bool InterProcessLock::enter (const int timeOutMillisecs)
|
|||
|
||||
for (;;)
|
||||
{
|
||||
const int result = fcntl (filedesc, F_SETLK, &fl);
|
||||
const int result = fcntl (internal, F_SETLK, &fl);
|
||||
|
||||
if (result >= 0)
|
||||
{
|
||||
|
|
@ -498,7 +492,7 @@ void InterProcessLock::exit()
|
|||
|
||||
for (;;)
|
||||
{
|
||||
const int result = fcntl (filedesc, F_SETLKW, &fl);
|
||||
const int result = fcntl (internal, F_SETLKW, &fl);
|
||||
|
||||
if (result >= 0 || errno != EINTR)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue