summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1363: Java 11: Complete renaming JEP 178 compatible native lib basename ↵Sven Gothel2019-08-182-3/+3
| | | | | | | | | | gluegen-rt -> gluegen_rt - Fix finding native library for Elf parsing - Fix one unit test - Fix comments Completes commit 330dad069dee5a0cc0480cf5cd9052000004223a
* iOS: NativeLibrary: Refine iOS, use proper alt system path for iOS+OSX, ↵Sven Gothel2019-06-212-8/+10
| | | | relax closeLibrary(..)
* Bug 1363: Java 11: Recognize Java9+ ..; Support JEP 178 static linkage ↵Sven Gothel2019-06-171-4/+16
| | | | | | | | | | | | | | | | | | | | | libgluegen-rt[.so] -> libgluegen_rt[.so|.a] Recognize Java9+ .. - Recognize new Java9+ version string as of JEP 223 - Avoid Classpath's private findLibrary call +++ Support JEP 178 static linkage (OpenJDK 1.8) - Need to change native library basename: libgluegen-rt[.so] -> libgluegen_rt[.so|.a] since the dash '-' is not supported in a ANSI-c function name. - Added 'JNI_OnLoad_gluegen_rt' to recognize statical linked JNI code - Added JNI_VERSION_1_8 to jni/jni.h
* iOS: Initial iOS support commit: build.xml targets, java code-path etcSven Gothel2019-06-172-3/+30
| | | | | | | | | | | | Current build system for JogAmp iOS Build is: - Build Machine: OSX Mojave 10.14 - Using own (still proprietary) OpenJDK 9 iOS Build - OpenJDK 1.8 (This will be replaced by OpenJDK 11 soon) - Xcode 10.2
* Merge branch 'master' of git://github.com/pini-gh/gluegen into pini-gh-masterSven Gothel2019-03-261-1/+2
|\
| * Support architecture ppc64le (Debian ppc64el).Gilles Filippini2015-10-281-1/+2
| |
* | Merge pull request #25 from ghost/masterSven Gothel2019-03-261-2/+3
|\ \ | |/ |/| adding support for android x86 targets - revised
| * added android x86 support.Xavier Hallade2015-02-161-2/+3
| |
* | Bug 1213: Use InterruptSource.ThreadSven Gothel2015-09-152-3/+5
| |
* | Bug 1213: Refine changes .. comments and APISven Gothel2015-09-152-50/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use InterruptSource.Thread.create(..), while reducing InterruptSource.Thread ctors to 3 variants. - Use InterruptSource.Thread instead of java.lang.Thread where possible - Use SourcedInterruptedException where possible - SingletonInstanceServerSocket: start(), stop() and run() - Persistent-Wait and Cancelable - Add @since 2.3.2
* | Bug 1213 - RecursiveThreadGroupLockImpl01Unfairish.unlock() always ↵Sven Gothel2015-09-052-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interrupts original-owner, even if not waiting at unlock() RecursiveThreadGroupLockImpl01Unfairish.unlock(): An interrupt() is always issued from group members on the original owner. This shall only happen, if the original owner is waiting within unlock() for all group members to be unlocked. This extra interrupt causes side-effects, see Bug 1211. Only issue the interrupt to wake-up the original owner iff waiting within unlock! +++ RecursiveLockImpl01CompleteFair: Issue 'Thread.interrupted()' to clear a slipped interrupt call after while-loop.
* | RecursiveThreadGroupLockImpl01Unfairish: Add toString() in ↵Sven Gothel2015-08-291-2/+2
| | | | | | | | IllegalArgumentException exceptions
* | Bug 1194: Reinstate system-lib search for NativeLibrary.open(..) and ↵Sven Gothel2015-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PlatformPropsImpl.findSysLib(..). This patch partially reverts of commit d12e4d4ea279998b27457691038e709879dcaca6. NativeLibrary.open(..) requires search of system libraries, since it loads the actual 'tool library' for which we generate the JNI binding. The 'tool library' is preferably the system wide installed version, e.g. libGL.so etc. PlatformPropsImpl.findSysLib(..) also requires finding system libraries as needed for PlatformPropsImpl.queryElfFile(..), i.e. using libjava.so etc. Only the JNI 'glue library', glueing java calls to the 'tool library', shall not use the system wide library search since we shall only use JogAmp provided instances here. This patch also reinstates binary compatibility w/ prev. GlueGen JARs since NativeLibrary.enumerateLibraryPath(..) is public. +++ Further more 'NativeLibrary.enumerateLibraryPath(..)' now adds OSX system framework search _before_ the user path in case 'searchSystemPath && searchSystemPathFirst'. Original code always added this search to the end, which does not match the intended behavior (-> bug).
* | Bug 1194: NativeLibrary: Remove dangerous search paths using the JRE ↵Xerxes Rånby2015-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extension mechanism NativeLibrary: API change: Removed searchSystemPathFirst argument to the open and enumerateLibraryPaths methods. Removed the generic sun.boot.library.path system path and the MacOS specific Frameworks paths from enumerateLibraryPaths. JNILibLoaderBase, PlatformPropsImpl & TestElfReader01: Updated to handle the NativeLibrary API change. This change will prevent JogAmp modules to pickup and load unsupported and old SUN JOGL 1 natives that may have been deployed with the JRE.
* | Fix Bitfield.put(..): Return previous valueSven Gothel2015-08-023-12/+20
| |
* | SyncedBitfield.clearField: Must be synchronizedSven Gothel2015-08-021-1/+1
| |
* | Bitfield: Refine API method names, add clearField(boolean), fix put32(..) ↵Sven Gothel2015-08-023-24/+51
| | | | | | | | and bitCount(), add unit test (passed)
* | Bitfield: Refine impl. complete get/put 32bit, add copy*(..), add ↵Sven Gothel2015-07-313-44/+232
| | | | | | | | synchronized delegation; TODO: Unit tests.
* | Bitfield: Use IndexOutOfBoundsException instead of ↵Sven Gothel2015-07-302-16/+16
| | | | | | | | ArrayIndexOutOfBoundsException
* | Introduce Bitfield interface w/ Int32 and Int32Array impl. deprecating ↵Sven Gothel2015-07-302-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | IntBitfield IntBitfield's 64bit bit-size is exceeding its use-case, making it less efficient and complicated. Bitfield offers a fast path implementation for 32 bits as well as a int[] implementation. TODO: 32 bit Unaligned putInt32(..) and getInt32(..), currently throwing UnsupportedOperationException for int[] impl.
* | PlatformPropsImpl: Add static final Version18 and Version19 VersionNumberSven Gothel2015-07-271-0/+6
|/
* Bug 1126 - Remove static query requirement of MachineDescriptor, find ↵Sven Gothel2015-02-027-160/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues. Currently the StaticConfig is being queried via the key[OSType, CPUType ..] as pre-determined by Java properties or the ELF parser. This adds complication to maintain different platforms and the key query might not even be sufficient. The MachineDescriptor's StaticConfig only purpose shall be to speed-up native data size and offset/alignment retrieval. This is done by using the StaticConfig index within all StaticConfig[]s as a lookup-index for the precomputed struct's size and offset tables. +++ Solution: Rename: MachineDescriptor -> MachineDataInfo Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime After having defined os.and.arch (OSType, CPUType and ABIType) w/ the optional help of the now self containing ELF Reader (Bug 1125), the native gluegen-rt library gets loaded enabling JNI methods. It is satisfactory to retrieve MachineDataInfo at runtime w/ JNI and find the matching/compatible StaticConfig. Only in case none is found, the program needs to abort. Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo are stored for further use (see above). This removes above complication and key to StaticConfig mapping. New platforms simply need to add a new unique entry into the StaticConfig[] table. ++ Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org, and Bug 1014 (MIPSLE), thanks to Dejan Latinovic. Parts of the patch for Bug 1014 from Dejan Latinovic are included. also solved by this change set.
* Bug 1125 - Make ELF Reader 'jogamp.common.os.elf' StatelessSven Gothel2015-02-0111-825/+1127
| | | | | | | | | | | | | | | | | | | | | | | | | ELF Reader 'jogamp.common.os.elf' currently uses Platform's pre-determined OS_TYPE and CPUType. It also uses the host platforms MachineDescription, hence can not read ELF files from other machines. This also forbids Platform to determine CPUType etc w/o having a valid 'os.arch' property. +++ ElfHeader should be split in - ElfHeaderPart1 (CPUType independent) - ElfHeaderPart2 (CPUType dependent) Fix shall make the ELF Reader self containing by only using ELF CPUType data, etc. This requires customization of struct parsing, where MachineDescription.Static index shall be - defined in ElfHeaderPart1 using e_Ident's CPUType. - used in ElfHeaderPart2 and all its struct types.
* Bug 1122: Refine AArch64 and OSType/32Bit incl. MachineDescriptionSven Gothel2015-01-301-27/+5
| | | | | | | | | | | | Android: - Detect ABIType.EABI_GNU_ARMHF via 'armeabi-v7a-hard' Platform.CPUType: - contains is32Bit now MachineDescription: - Rename *x86_64_unix* -> *lp64_unix*, reflecting universal __LP64__ mode - Remove is32Bit, which is determined by CPUType
* Refine Native Library Code: Bulk Permissions, Cleanup DynamicLinker impl. - ↵Sven Gothel2015-01-307-123/+260
| | | | | | | | | | | | | | | and fix Android AArch64 BionicDynamicLinker (Bug 1122) - Bulk Permissions ProcAddressTable.reset(..) performs address lookup in one block. Now claiming all permissions upfront once, and releasing them afterwards. - Cleanup DynamicLinker impl. Proper top-down impl. of DynamicLinkerImpl, handling all security code and validations. - Fix Android AArch64 BionicDynamicLinker (Bug 1122) Dalvik uses diff RTLD_* defines for AArch64!
* Bug 1122: Add AArch64 support (Android, GNU/Linux and in general)Sven Gothel2015-01-302-28/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add AArch64 detection via - Elf Parser - Android properties - Java properties - Android: Validate CPUType.Family _and_ ABIType - MachineDescription - Remove redundant Type ID and its field - Reuse X86_64_UNIX for AArch64 (static config) New ARCH 'aarch64' for ant: <os arch> armv8a aarch64 New CPUType.ARM64 (ARM): java: os.arch aarch64 arm64 New CPUType.ARMv8_A (ARM): java: os.arch armv8-a arm64-v8a New ABIType: EABI_AARCH64
* Bug 1122 - Elf Parser: EM_res183 -> EM_AARCH64, detecting AArch64; Updating ↵Sven Gothel2015-01-303-68/+182
| | | | Shdr and Ehdr via GlueGen
* Debug: Use JogAmp license, since we re-modelled it using PropertyAccess, ↵Sven Gothel2014-07-111-33/+21
| | | | commit GlueGen f4ac27e177f6deb444280d3b375e7d343e38bd08
* PlatformPropsImpl.getOSAndArch(..): Cleanup, use final String instances to ↵Sven Gothel2014-07-111-22/+33
| | | | ease review
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-0329-223/+217
| | | | | | | | | | | | | | | 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
* Fix 'typo' in messages: 'Catched' -> 'Caught'Sven Gothel2014-06-281-1/+1
|
* PosixDynamicLinkerImpl: cleanup uncommented enums's intendationSven Gothel2014-05-091-2/+2
|
* Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - ↵Sven Gothel2014-02-211-5/+1
| | | | readUInt32(..) must return long due to EOF
* Bug 980: Use Bitsream class for jogamp.common.os.elf.**Sven Gothel2014-02-202-18/+12
|
* Bug 958 - Add support for OpenJDK version notationSven Gothel2014-02-161-3/+10
| | | | | | | | | | | | | | | | | | Manu <[email protected]>: In OpenJDK, Java version notation is a little different from Oracle JDK one: OpenJDK uses "-u" instead of "_" to separate the version number from the update number, i.e. "1.7.0-u60-b04" vs "1.7.0_60-ea". That would be nice to take this into account in the static initializer of jogamp.common.os.PlatformPropsImpl class. You could simply replace the line: final int usIdx = JAVA_VERSION.lastIndexOf("_"); by: final int usIdx = JAVA_VERSION.replace("-u", "_").lastIndexOf("_"); If you want to program it better, you can also test the "java.runtime.name" property that returns "OpenJDK Runtime Environment" for OpenJDK. See also bug #944 https://jogamp.org/bugzilla/show_bug.cgi?id=944 +++ Done .. avoding the replace op.
* Bug 856 - Android: Support dual ABI (x86 i686 *and* ARMv7arm), i.e. pick ↵Sven Gothel2014-01-244-145/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'best' ABI - Use 'os.arch' as a prelim CPUType for MachineDescription - Always attempt to load a binary and parse it's elf header - Linux: self-exe - Android: gluegen-rt library - Other: java lib - Always use details (ABI) if ARM - Android: Check CPU_TYPE and CPU_TYPE2 // FIXME / HACK: // We use sCPUType for MachineDescriptionRuntime.getStatic() // until we have determined the final CPU_TYPE, etc. // MachineDescriptionRuntime gets notified via MachineDescriptionRuntime.notifyPropsInitialized() below. // // We could use Elf Ehdr's machine value to determine the bit-size // used for it's offset table! // However, 'os.arch' should be a good guess for this task. Tested manually on - Linux x86, x86_64, armhf (raspi) - Android intel and arm - Windows x86_64 - OSX x86_64
* Bug 944 - Platform doesn't parse early-access java-version string properly ↵Sven Gothel2014-01-141-5/+4
| | | | | | | | | (JAVA_VERSION_UPDATE) Fix JAVA_VERSION_UPDATE for early release versions. Early access java versions are e.g. '1.7.0_60-ea' where releases simply are named: '1.7.0_60'.
* PlatformPropsImpl: Add static class OSXVersion w/ selected OSX VersionNumbersSven Gothel2013-10-241-1/+11
|
* gluegen: add all missing @Override annotationsHarvey Harrison2013-10-177-0/+10
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-1723-437/+437
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Bug 816: Add Platform.JAVA_VERSION_UPDATE - Allowing to determin whether JVM ↵Sven Gothel2013-09-221-0/+15
| | | | is >= 1.7.0u40
* Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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 a typo (Retruns => Returns)Sylvestre Ledru2013-07-101-1/+1
|
* UnixDynamicLinkerImpl: Unify impl. of openLibraryLocal(..), ↵Sven Gothel2013-06-254-115/+32
| | | | openLibraryGlobal(..) and lookupSymbolGlobal(..) - removing duplicate code.
* Fix SingletonInstanceServerSocket.kill(): Needs to mark alive=false in case ↵Sven Gothel2013-06-251-1/+1
| | | | of JVM shutdown!
* Fix commit eb842815498f5926828b49c48fffce22fc9586a2: Adding missing filesSven Gothel2013-06-222-0/+179
|
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle ↵Sven Gothel2013-06-214-27/+63
| | | | | | | | | | | | | | | | | | | | | | access (2) - Completes 23341a2df2d2ea36784a16fa1db8bc7385351a12 - Replace 'DynamicLinker' interface w/ well documented one - All DynamicLinker methods are now considered secure, i.e.: - open/lookup and close utilize reference counting on handle via a hash map. - lookupSymbol(..) and close(..) impl. validate the passed library handle whether it's retrieved via open*. This is the fast path, not that expensive. - lookupSymbolGlobal(..) performs Check acccess of 'new RuntimePermission("loadLibrary.*")' if SecurityManager is installed. This is the slow path. - DynamicLibraryBundleInfo now reflects the security requirements, i.e. whether priviledged access is needed.
* DynamicLinker*: Proper Override notationSven Gothel2013-06-204-3/+15
|
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access.Sven Gothel2013-06-204-66/+137
|
* Robostness: Catch Throwables on NativeLibrary.open(..) and be verbose in ↵Sven Gothel2013-06-182-1/+9
| | | | DEBUG mode ; DynamicLinker: Add 'String getLastError()'.