31 pthread_mutexattr_t atts;
32 pthread_mutexattr_init (&atts);
33 pthread_mutexattr_settype (&atts, PTHREAD_MUTEX_RECURSIVE);
35 pthread_mutexattr_setprotocol (&atts, PTHREAD_PRIO_INHERIT);
37 pthread_mutex_init (&lock, &atts);
38 pthread_mutexattr_destroy (&atts);
48 : triggered (
false), manualReset (useManualReset)
50 pthread_cond_init (&condition, 0);
52 pthread_mutexattr_t atts;
53 pthread_mutexattr_init (&atts);
55 pthread_mutexattr_setprotocol (&atts, PTHREAD_PRIO_INHERIT);
57 pthread_mutex_init (&mutex, &atts);
62 pthread_cond_destroy (&condition);
63 pthread_mutex_destroy (&mutex);
68 pthread_mutex_lock (&mutex);
72 if (timeOutMillisecs < 0)
76 pthread_cond_wait (&condition, &mutex);
83 gettimeofday (&now, 0);
86 time.tv_sec = now.tv_sec + (timeOutMillisecs / 1000);
87 time.tv_nsec = (now.tv_usec + ((timeOutMillisecs % 1000) * 1000)) * 1000;
89 if (time.tv_nsec >= 1000000000)
91 time.tv_nsec -= 1000000000;
97 if (pthread_cond_timedwait (&condition, &mutex, &time) == ETIMEDOUT)
99 pthread_mutex_unlock (&mutex);
110 pthread_mutex_unlock (&mutex);
116 pthread_mutex_lock (&mutex);
121 pthread_cond_broadcast (&condition);
124 pthread_mutex_unlock (&mutex);
129 pthread_mutex_lock (&mutex);
131 pthread_mutex_unlock (&mutex);
137 struct timespec time;
138 time.tv_sec = millisecs / 1000;
139 time.tv_nsec = (millisecs % 1000) * 1000000;
140 nanosleep (&time,
nullptr);
161 char localBuffer [1024];
162 char* cwd = getcwd (localBuffer,
sizeof (localBuffer) - 1);
163 size_t bufferSize = 4096;
165 while (cwd ==
nullptr && errno == ERANGE)
167 heapBuffer.
malloc (bufferSize);
168 cwd = getcwd (heapBuffer, bufferSize - 1);
184 struct ::sigaction act;
185 (
void) ::sigaction (sig,
nullptr, &act);
188 act.sa_flags &= ~SA_RESTART;
190 act.sa_flags |= SA_RESTART;
192 return ::sigaction (sig, &act,
nullptr);
198 #if JUCE_LINUX || (JUCE_IOS && ! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug)
199 typedef struct stat64 juce_statStruct;
200 #define JUCE_STAT stat64
202 typedef struct stat juce_statStruct;
203 #define JUCE_STAT stat
206 bool juce_stat (
const String& fileName, juce_statStruct&
info)
213 bool juce_doStatFS (
File f,
struct statfs& result)
215 for (
int i = 5; --i >= 0;)
226 #if (JUCE_MAC && MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_5) || JUCE_IOS
227 static int64 getCreationTime (
const juce_statStruct& s)
noexcept {
return (
int64) s.st_birthtime; }
229 static int64 getCreationTime (
const juce_statStruct& s)
noexcept {
return (
int64) s.st_ctime; }
232 void updateStatInfoForFile (
const String& path,
bool*
const isDir,
int64*
const fileSize,
233 Time*
const modTime,
Time*
const creationTime,
bool*
const isReadOnly)
235 if (isDir !=
nullptr || fileSize !=
nullptr || modTime !=
nullptr || creationTime !=
nullptr)
237 juce_statStruct
info;
238 const bool statOk = juce_stat (path, info);
240 if (isDir !=
nullptr) *isDir = statOk && ((info.st_mode & S_IFDIR) != 0);
241 if (fileSize !=
nullptr) *fileSize = statOk ? (
int64) info.st_size : 0;
242 if (modTime !=
nullptr) *modTime =
Time (statOk ? (
int64) info.st_mtime * 1000 : 0);
243 if (creationTime !=
nullptr) *creationTime =
Time (statOk ? getCreationTime (info) * 1000 : 0);
246 if (isReadOnly !=
nullptr)
247 *isReadOnly = access (path.
toUTF8(), W_OK) != 0;
250 Result getResultForErrno()
255 Result getResultForReturnValue (
int value)
257 return value == -1 ? getResultForErrno() :
Result::ok();
266 juce_statStruct
info;
269 && (juce_stat (fullPath, info) && ((info.st_mode & S_IFDIR) != 0));
275 && access (fullPath.
toUTF8(), F_OK) == 0;
285 juce_statStruct
info;
286 return juce_stat (fullPath, info) ? info.st_size : 0;
291 juce_statStruct
info;
292 return juce_stat (fullPath, info) ? (
uint64) info.st_ino : 0;
299 return access (fullPath.
toUTF8(), W_OK) == 0;
307 static bool setFileModeFlags (
const String& fullPath, mode_t
flags,
bool shouldSet)
noexcept
309 juce_statStruct
info;
310 if (! juce_stat (fullPath, info))
313 info.st_mode &= 0777;
316 info.st_mode |=
flags;
318 info.st_mode &= ~
flags;
320 return chmod (fullPath.toUTF8(), info.st_mode) == 0;
323 bool File::setFileReadOnlyInternal (
bool shouldBeReadOnly)
const
326 return setFileModeFlags (fullPath, S_IWUSR | S_IWGRP | S_IWOTH, ! shouldBeReadOnly);
329 bool File::setFileExecutableInternal (
bool shouldBeExecutable)
const
331 return setFileModeFlags (fullPath, S_IXUSR | S_IXGRP | S_IXOTH, shouldBeExecutable);
334 void File::getFileTimesInternal (
int64& modificationTime,
int64& accessTime,
int64& creationTime)
const
336 modificationTime = 0;
340 juce_statStruct
info;
342 if (juce_stat (fullPath, info))
344 modificationTime = (
int64) info.st_mtime * 1000;
345 accessTime = (
int64) info.st_atime * 1000;
346 creationTime = (
int64) info.st_ctime * 1000;
350 bool File::setFileTimesInternal (
int64 modificationTime,
int64 accessTime,
int64 )
const
352 juce_statStruct
info;
354 if ((modificationTime != 0 || accessTime != 0) && juce_stat (fullPath, info))
356 struct utimbuf times;
357 times.actime = accessTime != 0 ? (time_t) (accessTime / 1000) : info.st_atime;
358 times.modtime = modificationTime != 0 ? (time_t) (modificationTime / 1000) : info.st_mtime;
360 return utime (fullPath.
toUTF8(), ×) == 0;
372 return rmdir (fullPath.
toUTF8()) == 0;
374 return remove (fullPath.
toUTF8()) == 0;
377 bool File::moveInternal (
const File& dest)
const
393 Result File::createDirectoryInternal (
const String& fileName)
const
395 return getResultForReturnValue (mkdir (fileName.
toUTF8(), 0777));
401 if (handle != 0 && lseek (getFD (handle), pos,
SEEK_SET) == pos)
407 void FileInputStream::openHandle()
412 fileHandle = fdToVoidPointer (f);
414 status = getResultForErrno();
420 close (getFD (fileHandle));
423 size_t FileInputStream::readInternal (
void*
const buffer,
const size_t numBytes)
429 result =
::read (getFD (fileHandle), buffer, numBytes);
433 status = getResultForErrno();
438 return (
size_t) result;
442 void FileOutputStream::openHandle()
450 currentPosition = lseek (f, 0,
SEEK_END);
452 if (currentPosition >= 0)
454 fileHandle = fdToVoidPointer (f);
458 status = getResultForErrno();
464 status = getResultForErrno();
472 fileHandle = fdToVoidPointer (f);
474 status = getResultForErrno();
478 void FileOutputStream::closeHandle()
482 close (getFD (fileHandle));
487 ssize_t FileOutputStream::writeInternal (
const void*
const data,
const size_t numBytes)
493 result =
::write (getFD (fileHandle), data, numBytes);
496 status = getResultForErrno();
502 void FileOutputStream::flushInternal()
506 if (fsync (getFD (fileHandle)) == -1)
507 status = getResultForErrno();
526 return getResultForReturnValue (ftruncate (getFD (fileHandle), (off_t) currentPosition));
532 if (
const char* s = ::getenv (name.
toUTF8()))
539 void MemoryMappedFile::openInternal (
const File& file, AccessMode
mode)
545 const long pageSize = sysconf (_SC_PAGE_SIZE);
550 mode ==
readWrite ? (O_CREAT + O_RDWR) : O_RDONLY, 00644);
552 if (fileHandle != -1)
554 void* m = mmap (0, (
size_t) range.
getLength(),
555 mode ==
readWrite ? (PROT_READ | PROT_WRITE) : PROT_READ,
556 MAP_SHARED, fileHandle,
557 (off_t) range.getStart());
562 madvise (m, (
size_t) range.
getLength(), MADV_SEQUENTIAL);
573 if (address !=
nullptr)
574 munmap (address, (
size_t) range.
getLength());
581 #if JUCE_PROJUCER_LIVE_BUILD
582 extern "C" const char* juce_getCurrentExecutablePath();
588 #if JUCE_PROJUCER_LIVE_BUILD
589 return File (juce_getCurrentExecutablePath());
595 static String getFilename()
603 static String filename (DLAddrReader::getFilename());
612 if (juce_doStatFS (*
this, buf))
613 return (
int64) buf.f_bsize * (
int64) buf.f_bavail;
621 if (juce_doStatFS (*
this, buf))
622 return (
int64) buf.f_bsize * (
int64) buf.f_blocks;
633 attrreference_t mountPointRef;
634 char mountPointSpace [MAXPATHLEN];
637 struct attrlist attrList;
639 attrList.bitmapcount = ATTR_BIT_MAP_COUNT;
640 attrList.volattr = ATTR_VOL_INFO | ATTR_VOL_NAME;
647 return String::fromUTF8 (((
const char*) &attrBuf.mountPointRef) + attrBuf.mountPointRef.attr_dataoffset,
648 (
int) attrBuf.mountPointRef.attr_length);
688 int result = system (command.
toUTF8());
729 if (!
createLockFile (
File (
"~/Library/Caches/com.juce.locks").getChildFile (lockName), timeOutMillisecs))
731 createLockFile (
File (
"/tmp/com.juce.locks").getChildFile (lockName), timeOutMillisecs);
734 File tempFolder (
"/var/tmp");
764 const int result = fcntl (
handle, F_SETLK, &fl);
769 const int error = errno;
773 if (error == EBADF || error == ENOTSUP)
776 if (timeOutMillisecs == 0
799 while (! (fcntl (
handle, F_SETLKW, &fl) >= 0 || errno != EINTR))
823 if (pimpl ==
nullptr)
825 pimpl =
new Pimpl (name, timeOutMillisecs);
835 return pimpl !=
nullptr;
845 if (pimpl !=
nullptr && --(pimpl->
refCount) == 0)
867 void Thread::launchThread()
870 pthread_t handle = 0;
874 pthread_detach (handle);
875 threadHandle = (
void*) handle;
880 void Thread::closeThreadHandle()
886 void Thread::killThread()
888 if (threadHandle != 0)
893 pthread_cancel ((pthread_t) threadHandle);
900 #if JUCE_IOS || (JUCE_MAC && defined (MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
903 [[NSThread currentThread] setName: juceStringToNS (name)];
906 #if (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
907 pthread_setname_np (pthread_self(), name.
toRawUTF8());
909 prctl (PR_SET_NAME, name.
toRawUTF8(), 0, 0, 0);
914 bool Thread::setThreadPriority (
void* handle,
int priority)
916 struct sched_param param;
918 priority =
jlimit (0, 10, priority);
920 if (handle ==
nullptr)
921 handle = (
void*) pthread_self();
923 if (pthread_getschedparam ((pthread_t) handle, &policy, ¶m) != 0)
926 policy = priority == 0 ? SCHED_OTHER : SCHED_RR;
928 const int minPriority = sched_get_priority_min (policy);
929 const int maxPriority = sched_get_priority_max (policy);
931 param.sched_priority = ((maxPriority - minPriority) * priority) / 10 + minPriority;
932 return pthread_setschedparam ((pthread_t) handle, policy, ¶m) == 0;
950 #if defined (CPU_ISSET) && ! defined (SUPPORT_AFFINITIES)
951 #define SUPPORT_AFFINITIES 1
956 #if SUPPORT_AFFINITIES
958 CPU_ZERO (&affinity);
960 for (
int i = 0; i < 32; ++i)
961 if ((affinityMask & (1 << i)) != 0)
962 CPU_SET (i, &affinity);
964 #if (! JUCE_ANDROID) && ((! JUCE_LINUX) || ((__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2004))
965 pthread_setaffinity_np (pthread_self(),
sizeof (cpu_set_t), &affinity);
970 sched_setaffinity (getpid(),
sizeof (cpu_set_t), &affinity);
988 return handle !=
nullptr;
993 if (handle !=
nullptr)
1002 return handle !=
nullptr ? dlsym (handle, functionName.toUTF8()) :
nullptr;
1012 :
childPID (0), pipeHandle (0), readHandle (0)
1016 jassert ((! arguments[0].containsChar (
'/'))
1019 int pipeHandles[2] = { 0 };
1021 if (pipe (pipeHandles) == 0)
1023 const pid_t result = fork();
1027 close (pipeHandles[0]);
1028 close (pipeHandles[1]);
1030 else if (result == 0)
1033 close (pipeHandles[0]);
1036 dup2 (pipeHandles[1], 1);
1038 close (STDOUT_FILENO);
1041 dup2 (pipeHandles[1], 2);
1043 close (STDERR_FILENO);
1045 close (pipeHandles[1]);
1048 for (
int i = 0; i < arguments.
size(); ++i)
1049 if (arguments[i].isNotEmpty())
1050 argv.
add (const_cast<char*> (arguments[i].toUTF8().getAddress()));
1061 pipeHandle = pipeHandles[0];
1062 close (pipeHandles[1]);
1069 if (readHandle != 0)
1070 fclose (readHandle);
1072 if (pipeHandle != 0)
1081 const int pid = waitpid (
childPID, &childState, WNOHANG);
1082 return pid == 0 || ! (WIFEXITED (childState) || WIFSIGNALED (childState));
1093 #error // the zlib headers define this function as NULL!
1096 if (readHandle == 0 &&
childPID != 0)
1097 readHandle = fdopen (pipeHandle,
"r");
1099 if (readHandle != 0)
1100 return (
int) fread (dest, 1, (
size_t) numBytes, readHandle);
1107 return ::kill (
childPID, SIGKILL) == 0;
1115 const int pid = waitpid (
childPID, &childState, WNOHANG);
1117 if (pid >= 0 && WIFEXITED (childState))
1118 return WEXITSTATUS (childState);
1140 if (args.
size() == 0)
1145 if (activeProcess->childPID == 0)
1146 activeProcess =
nullptr;
1148 return activeProcess !=
nullptr;
1167 if (thread != pthread_self())
1174 if (pthread_create (&thread,
nullptr, timerThread,
this) == 0)
1175 setThreadToRealtime (thread, (
uint64) newPeriod);
1193 while (thread != 0 && thread != pthread_self())
1203 bool volatile shouldStop;
1205 static void* timerThread (
void* param)
1211 pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &dummy);
1214 reinterpret_cast<Pimpl*
> (param)->timerThread();
1221 Clock clock (lastPeriod);
1223 while (! shouldStop)
1228 if (lastPeriod != periodMs)
1231 clock = Clock (lastPeriod);
1241 #if JUCE_MAC || JUCE_IOS
1244 mach_timebase_info_data_t timebase;
1245 (
void) mach_timebase_info (&timebase);
1246 delta = (((uint64_t) (millis * 1000000.0)) * timebase.denom) / timebase.numer;
1247 time = mach_absolute_time();
1253 mach_wait_until (time);
1256 uint64_t time, delta;
1259 Clock (
double millis)
noexcept : delta ((
uint64) (millis * 1000000))
1266 t.tv_sec = (time_t) (delta / 1000000000);
1267 t.tv_nsec = (long) (delta % 1000000000);
1268 nanosleep (&t,
nullptr);
1273 Clock (
double millis)
noexcept : delta ((
uint64) (millis * 1000000))
1276 clock_gettime (CLOCK_MONOTONIC, &t);
1285 t.tv_sec = (time_t) (time / 1000000000);
1286 t.tv_nsec = (long) (time % 1000000000);
1288 clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &t,
nullptr);
1295 static bool setThreadToRealtime (pthread_t thread,
uint64 periodMs)
1297 #if JUCE_MAC || JUCE_IOS
1298 thread_time_constraint_policy_data_t policy;
1299 policy.period = (uint32_t) (periodMs * 1000000);
1300 policy.computation = 50000;
1301 policy.constraint = policy.period;
1302 policy.preemptible =
true;
1304 return thread_policy_set (pthread_mach_thread_np (thread),
1305 THREAD_TIME_CONSTRAINT_POLICY,
1306 (thread_policy_t) &policy,
1307 THREAD_TIME_CONSTRAINT_POLICY_COUNT) == KERN_SUCCESS;
1311 struct sched_param param;
1312 param.sched_priority = sched_get_priority_max (SCHED_RR);
1313 return pthread_setschedparam (thread, SCHED_RR, ¶m) == 0;
void * ThreadID
Definition: juce_Thread.h:224
Definition: juce_MemoryMappedFile.h:43
String getVolumeLabel() const
Definition: juce_posix_SharedCode.h:627
bool setAsCurrentWorkingDirectory() const
Definition: juce_posix_SharedCode.h:175
void enter() const noexcept
Definition: juce_posix_SharedCode.h:42
static String toHexString(int number)
Definition: juce_String.cpp:1925
bool enter(int timeOutMillisecs=-1)
Definition: juce_posix_SharedCode.h:819
bool open(const String &name)
Definition: juce_posix_SharedCode.h:984
~ActiveProcess()
Definition: juce_posix_SharedCode.h:1067
~WaitableEvent() noexcept
Definition: juce_posix_SharedCode.h:60
int pointer_sized_int
Definition: juce_MathsFunctions.h:86
Pimpl(const String &lockName, const int timeOutMillisecs)
Definition: juce_posix_SharedCode.h:725
struct backing_store_struct * info
Definition: jmemsys.h:183
~CriticalSection() noexcept
Definition: juce_posix_SharedCode.h:41
File() noexcept
Definition: juce_File.h:57
#define noexcept
Definition: juce_CompilerSupport.h:141
File juce_getExecutableFile()
Definition: juce_posix_SharedCode.h:586
void exit()
Definition: juce_posix_SharedCode.h:838
int getVolumeSerialNumber() const
Definition: juce_posix_SharedCode.h:662
bool existsAsFile() const
Definition: juce_posix_SharedCode.h:278
bool start(const String &command, int streamFlags=wantStdOut|wantStdErr)
Definition: juce_posix_SharedCode.h:1133
bool exists() const
Definition: juce_posix_SharedCode.h:272
String appFile
Definition: juce_android_JNIHelpers.h:250
Definition: juce_ScopedLock.h:59
static String getEnvironmentVariable(const String &name, const String &defaultValue)
Definition: juce_posix_SharedCode.h:530
Definition: juce_Time.h:41
File getChildFile(StringRef relativeOrAbsolutePath) const
Definition: juce_File.cpp:358
Definition: juce_ChildProcess.h:57
void malloc(const size_t newNumElements, const size_t elementSize=sizeof(ElementType))
Definition: juce_HeapBlock.h:220
Definition: juce_CharPointer_UTF8.h:38
~Pimpl()
Definition: juce_posix_SharedCode.h:1158
String juce_getOutputFromCommand(const String &)
Definition: juce_posix_SharedCode.h:693
static void JUCE_CALLTYPE setCurrentThreadAffinityMask(uint32 affinityMask)
Definition: juce_posix_SharedCode.h:954
static ThreadID JUCE_CALLTYPE getCurrentThreadId()
Definition: juce_posix_SharedCode.h:935
static File getCurrentWorkingDirectory()
Definition: juce_posix_SharedCode.h:157
void add(const ElementType &newElement)
Definition: juce_Array.h:392
int juce_siginterrupt(int sig, int flag)
Definition: juce_posix_SharedCode.h:182
static void JUCE_CALLTYPE yield()
Definition: juce_posix_SharedCode.h:940
#define false
Definition: ordinals.h:83
ValueType getLength() const noexcept
Definition: juce_Range.h:98
Definition: juce_String.h:43
Definition: juce_Result.h:61
void * threadEntryProc(void *)
Definition: juce_posix_SharedCode.h:853
static const String separatorString
Definition: juce_File.h:908
void signal() const noexcept
Definition: juce_posix_SharedCode.h:114
void juce_runSystemCommand(const String &)
Definition: juce_posix_SharedCode.h:686
void ignoreUnused(const Type1 &) noexcept
Definition: juce_core.h:280
#define JUCE_API
Definition: juce_StandardHeader.h:139
bool isNotEmpty() const noexcept
Definition: juce_String.h:308
AndroidSystem android
Definition: juce_android_SystemStats.cpp:158
virtual void hiResTimerCallback()=0
Definition: juce_HighResolutionTimer.h:46
void start(int newPeriod)
Definition: juce_posix_SharedCode.h:1163
bool containsChar(juce_wchar character) const noexcept
Definition: juce_String.cpp:1058
JOCTET * buffer
Definition: juce_JPEGLoader.cpp:302
void reset() const noexcept
Definition: juce_posix_SharedCode.h:127
void zerostruct(Type &structure) noexcept
Definition: juce_Memory.h:38
uint64 getFileIdentifier() const
Definition: juce_posix_SharedCode.h:289
bool deleteFile() const
Definition: juce_posix_SharedCode.h:366
String loadFileAsString() const
Definition: juce_File.cpp:487
void close()
Definition: juce_win32_Threads.cpp:390
int64 getVolumeTotalSize() const
Definition: juce_posix_SharedCode.h:618
png_structrp int mode
Definition: juce_PNGLoader.cpp:1243
static StringArray fromTokens(StringRef stringToTokenise, bool preserveQuotedStrings)
Definition: juce_StringArray.cpp:403
there are legal restrictions on arithmetic coding Invalid progressive parameters caller expects u Cannot quantize more than d color components Adobe APP14 flags
Definition: juce_JPEGLoader.cpp:127
ActiveProcess(const StringArray &arguments, int streamFlags)
Definition: juce_posix_SharedCode.h:1011
int volatile periodMs
Definition: juce_posix_SharedCode.h:1199
unsigned long long uint64
Definition: juce_MathsFunctions.h:62
unsigned int uint32
Definition: juce_MathsFunctions.h:51
HighResolutionTimer & owner
Definition: juce_posix_SharedCode.h:1198
Result create() const
Definition: juce_File.cpp:429
bool killProcess() const noexcept
Definition: juce_posix_SharedCode.h:1105
int64 getBytesFreeOnVolume() const
Definition: juce_posix_SharedCode.h:609
static int64 currentTimeMillis() noexcept
Definition: juce_Time.cpp:196
void flush() override
Definition: juce_FileOutputStream.cpp:79
static void JUCE_CALLTYPE setCurrentThreadName(const String &newThreadName)
Definition: juce_posix_SharedCode.h:898
bool isRunning() const noexcept
Definition: juce_posix_SharedCode.h:1076
static void JUCE_CALLTYPE terminate()
Definition: juce_posix_SharedCode.h:143
int64 getSize() const
Definition: juce_posix_SharedCode.h:283
static const juce_wchar separator
Definition: juce_File.h:903
#define EXIT_FAILURE
Definition: jerror.c:32
bool hasWriteAccess() const
Definition: juce_posix_SharedCode.h:296
#define JUCE_STAT
Definition: juce_posix_SharedCode.h:203
png_uint_32 length
Definition: juce_PNGLoader.cpp:2078
bool isEmpty() const noexcept
Definition: juce_String.h:302
static Random & getSystemRandom() noexcept
Definition: juce_Random.cpp:64
CriticalSection() noexcept
Definition: juce_posix_SharedCode.h:29
long long int64
Definition: juce_MathsFunctions.h:60
int handle
Definition: juce_posix_SharedCode.h:807
int refCount
Definition: juce_posix_SharedCode.h:807
#define JUCE_AUTORELEASEPOOL
void JUCE_API juce_threadEntryPoint(void *)
Definition: juce_core.cpp:112
int size() const noexcept
Definition: juce_StringArray.h:121
Definition: juce_StringArray.h:39
void setStart(const ValueType newStart) noexcept
Definition: juce_Range.h:111
bool write(const void *, size_t) override
Definition: juce_FileOutputStream.cpp:85
bool isDirectory() const
Definition: juce_posix_SharedCode.h:264
bool wait(int timeOutMilliseconds=-1) const noexcept
Definition: juce_posix_SharedCode.h:66
Type jlimit(const Type lowerLimit, const Type upperLimit, const Type valueToConstrain) noexcept
Definition: juce_MathsFunctions.h:220
InterProcessLock(const String &name)
Definition: juce_posix_SharedCode.h:811
void * getFunction(const String &functionName) noexcept
Definition: juce_posix_SharedCode.h:1000
Definition: juce_Array.h:60
static String fromUTF8(const char *utf8buffer, int bufferSizeBytes=-1)
Definition: juce_String.cpp:2112
bool tryEnter() const noexcept
Definition: juce_posix_SharedCode.h:43
const char * toRawUTF8() const
Definition: juce_String.cpp:2061
Definition: juce_android_JNIHelpers.h:111
int refCount
Definition: juce_core.cpp:808
void
Definition: juce_PNGLoader.cpp:1173
uint32 getExitCode() const noexcept
Definition: juce_posix_SharedCode.h:1110
Definition: juce_File.h:822
static void JUCE_CALLTYPE sleep(int milliseconds)
Definition: juce_posix_SharedCode.h:135
Definition: juce_android_JNIHelpers.h:381
Definition: juce_HeapBlock.h:90
WaitableEvent(bool manualReset=false) noexcept
Definition: juce_posix_SharedCode.h:47
Definition: juce_posix_SharedCode.h:1152
Definition: juce_MemoryMappedFile.h:44
Result truncate()
Definition: juce_posix_SharedCode.h:520
int handle
Definition: juce_core.cpp:808
Definition: juce_ChildProcess.h:58
static File JUCE_CALLTYPE getSpecialLocation(const SpecialLocationType type)
Definition: juce_android_Files.cpp:49
~InterProcessLock()
Definition: juce_posix_SharedCode.h:815
const String & getFullPathName() const noexcept
Definition: juce_File.h:150
JSAMPIMAGE data
Definition: jpeglib.h:945
int read(void *const dest, const int numBytes) noexcept
Definition: juce_posix_SharedCode.h:1088
ElementType * getRawDataPointer() noexcept
Definition: juce_Array.h:319
void closeFile()
Definition: juce_posix_SharedCode.h:789
Pimpl(HighResolutionTimer &t)
Definition: juce_posix_SharedCode.h:1154
ValueType getStart() const noexcept
Definition: juce_Range.h:95
void exit() const noexcept
Definition: juce_posix_SharedCode.h:44
Definition: juce_File.h:45
CharType * getAddress() const noexcept
Definition: juce_CharPointer_UTF8.h:74
int childPID
Definition: juce_posix_SharedCode.h:1124
void close()
Definition: juce_posix_SharedCode.h:991
int64 juce_fileSetPosition(void *handle, int64 pos)
Definition: juce_posix_SharedCode.h:399
void callVoidMethod(jmethodID methodID,...) const
Definition: juce_android_JNIHelpers.h:91
~Pimpl()
Definition: juce_posix_SharedCode.h:742
~MemoryMappedFile()
Definition: juce_posix_SharedCode.h:571
void stop()
Definition: juce_posix_SharedCode.h:1187
bool createLockFile(const File &file, const int timeOutMillisecs)
Definition: juce_posix_SharedCode.h:747
wchar_t juce_wchar
Definition: juce_CharacterFunctions.h:49
CharPointer_UTF8 toUTF8() const
Definition: juce_String.cpp:2057
File getParentDirectory() const
Definition: juce_File.cpp:304
Definition: juce_posix_SharedCode.h:1008
GlobalRef activity
Definition: juce_android_JNIHelpers.h:249
static Result fail(const String &errorMessage) noexcept
Definition: juce_Result.cpp:70
Definition: juce_posix_SharedCode.h:722