aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/locks
Commit message (Collapse)AuthorAgeFilesLines
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-032-9/+9
| | | | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-176-61/+61
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class. Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to 'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization. Iff that happens, an AccessControlException may happen, due to requesting an insecure property, since modules own Debug class has not been added it's trusted prefixes from within it's init block yet. This seems to be a bug of the JVM .. to me, however .. the above description is the only able to explain the issue at hand. +++ Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(), before calling 'isPropertyDefined(propName, default)'. +++ Also mark Debug class static methods final! +++
* Fix commit e46b51f75b550bc0faf70ae18f526d466d8180f3Sven Gothel2013-06-241-0/+3
| | | | Funny .. subclasses didn't compile in test compilation locally.
* SingletonInstance: Add stats about time/attempts, subtract real-time delta ↵Sven Gothel2013-06-241-10/+20
| | | | from remaining amount.
* Function- RunnableTask: Add PrintStream 'exceptionOut' argument allowing non ↵Sven Gothel2013-03-181-3/+5
| | | | | | | blocking exceptions to be shown. Exceptions occuring on non blocking off-thread tasks shall at least be made visible while not allowed to crash the system.
* RecursiveLock.getHoldCount(): Fix API doc formattingSven Gothel2013-01-181-4/+7
|
* SingletonInstanceServerSocket: Add unit tests; Create new server Thread @ ↵Sven Gothel2012-09-211-5/+8
| | | | start, otherwise we may collide w/ a failed start. Misc: Cleanup / reuse strings.
* Lock Cleanup (API Change)Sven Gothel2012-06-275-8/+16
| | | | | | | | - LockExt -> ThreadLock - clarifying semantics (API Change) - ThreadLock: Remove isOwner(), use isOwner(Thread.currentThread) - adding @Override
* SecurityUtil: Generalize cert validation and AccessControlContext query; ↵Sven Gothel2012-03-131-5/+2
| | | | | | | | | | | | | | | | | | PropertyAccess: Fix security code, grant access to common 'trusted' properties - SecurityUtil - Generalize cert validation for JAR and property access - Grant access to common AccessControlContext for 'same' cert - PropertyAccess: - Fix security code: Passing the current AccessControlContext from the caller didn't include priviledges. - Grant access to common 'trusted' properties, which removes the need of passing the AccessControlContext for general properties like 'jnlp.', 'jogamp.' .. - Enable registering 'trusted' properties, when caller's cert is 'same'
* Intro.: PropertyAccess ; Added safe PropertyAccess for JNILibLoaderBase, ↵Sven Gothel2012-03-131-2/+4
| | | | | | | | | | | | | | | | | Platform, IOUtil, .. - Intro.: PropertyAccess - Base class of all Debug impl, reduces redundancies. - jnlpAlias'ed trusted property is queried within local AccessControlContext to avoid 'JRE' implementation differences (should not be required). - throw NPE and IllegalArgumentException for invalid property key - Added safe PropertyAccess - JNILibLoaderBase: sun.jnlp.applet.launcher - Platform: jogamp.gluegen.UseTempJarCache - IOUtil: java.io.tmpdir
* RecursiveThreadGroupLock: New recursive lock interface and impl, allowing ↵Sven Gothel2011-12-112-1/+146
| | | | | | | | | | | | 'spawn off' process to become the lock owner. To avoid complicated synchronization via synchronized, wait and notify between one thread and a 'spawn' off thread which temporarly requires the hold lock, RecursiveThreadGroupLock allows to add and remove other threads to become owners of the lock as if they were the original holder. This simplifies some rare locking use cases, eg. in JOGL's GLProfile initialization sequence where a SharedResourceRunner thread is taking over initialization of shared resources.
* Cleanup Lock Package: API doc, complete throws declaration, interface ↵Sven Gothel2011-12-113-3/+14
| | | | | | RecursiveLockImpl01Unfairish.Sync RecursiveLockImpl01Unfairish changes are in preparation of RecursiveGroupThreadLock.
* Move TRACE_LOCK from RecursiveLock -> LockSven Gothel2011-11-262-9/+4
|
* Lock ChangeSet (fin): Cleanup, fix and enhance RecursiveLock implementationSven Gothel2011-09-271-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - RecursiveLock _is_ interface. - Use LockFactory to create a RecursiveLock. - Impl: RecursiveLockImpl01Unfairish - just using notify w/o any queue: fast - still enqueuing new lock-applicants if queue full (nice) - lock's sync extends AbstractOwnableSynchronizer and uses it (monitor) - Impl: RecursiveLockImpl01CompleteFair - using queue and interrupt for correctness (slow) - lock's sync extends AbstractOwnableSynchronizer and uses it (monitor) - Impl: RecursiveLockImplJava5 for using Java5's concurrency impl. - to verify correctness, performance and deviation of locking time TestRecursiveLock01 new performance measurements incl. simple avrg and deviation shows best combined performance-deviation w/ our RecursiveLockImpl01Unfairish os Linux and MacOSX. RecursiveLockImpl01Unfairish is the default in LockFactory. Adding 'private' LockDebugUtil, allowing validating all holdings locks of one thread as stack traces (Throwable). Besides the AbstractOwnableSynchronizer utilization, this helps debugging deadlocks and starvation very well.
* Lock ChangeSet: New RecursiveLock interface. Minor API change to of tryLock ↵Sven Gothel2011-09-272-3/+55
| | | | throws declaration
* Lock ChangeSet: Prepare RecursiveLock to be an implementation of it's new ↵Sven Gothel2011-09-271-245/+0
| | | | interface
* SingletonInstance Enhancements / Minor Lock/LockExt API Change (isLocked ↵Sven Gothel2011-06-113-109/+75
| | | | | | | | | | | | | | | moved up) We learned that FileChannel.lock() is not reliable on at least GNU/Linux + Sun's JVM implementation, hence we need a ServerSocket implementation. Since this code may be useful to others, it has been promoted to GlueGen. - Abstract SingletonInstance - Implement Lock interface - SingletonInstance Spezialisation: FileLock and ServerSocket Minor API Change: LockExt.isLocked() -> Lock.isLocked()
* Complete relocation of SingletonInstance.java from JOGLSven Gothel2011-06-111-0/+164
|
* RecursiveLock: Expose waiting thread queue sizeSven Gothel2011-04-261-0/+6
|
* RecursiveLock: static field -> final; NativeLibrary: cleanupSven Gothel2011-02-261-1/+1
|
* html fixesSven Gothel2011-02-091-1/+1
|
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-092-2/+2
| | | | | | | | | | | | jogamp.<module> - com.jogamp.common.impl -> jogamp.common This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* Enhance API doc .. package description etcSven Gothel2010-11-091-0/+9
|
* RecursiveLock: TRACE_LOCK: StackTrace -> err.printlnSven Gothel2010-10-291-2/+4
|
* Moved locking to: com.jogamp.common.util.locks ; Better abstraction ; Misc ↵Sven Gothel2010-10-143-0/+364
changes