Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25280
| From | Steven Simpson <ss@domain.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JNI and GetFieldID |
| Date | 2013-09-13 13:31 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <d5dbga-em5.ln1@s.simpson148.btinternet.com> (permalink) |
| References | (1 earlier) <gb2pfa-s33.ln1@s.simpson148.btinternet.com> <l0d1ak$5s5$1@node1.news.atman.pl> <l0g277$75f$1@node1.news.atman.pl> <7cstfa-3nc.ln1@s.simpson148.btinternet.com> <l0hjht$nvr$1@node1.news.atman.pl> |
On 08/09/13 11:29, Borneq wrote: > Inside StateProc I can call my_callback function, and ACEListProc will > be called inside native function. Native function can store env and > others parameters. But how within StateProc refer to this env and > other parameters? It's a bugger, isn't it?! > This parameters must be stored globally in data segment? Perhaps. This option would need some synchronization on the Java side to protect it, but I'm not sure that would suffice in some cases (e.g., when the class you lock on is loaded multiple times). A thread-local in C? Find out what the JVM uses for threads, and use its thread-local feature. Perhaps you can use the C callback just to build up a structure locally. When control returns from the library back to your JNI function, you iterate over the structure to invoke Java callbacks. I'm out of decent ideas. -- ss at comp dot lancs dot ac dot uk
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-05 17:05 +0200
Re: JNI and GetFieldID Mark <i@dontgetlotsofspamanymore.invalid> - 2013-09-06 10:25 +0100
Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-06 16:36 +0300
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 18:53 +0200
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 20:44 +0200
Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-06 22:34 +0300
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-06 23:06 +0200
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-07 22:27 +0200
Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-08 10:24 +0100
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-08 12:29 +0200
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-08 22:45 +0200
Re: JNI and GetFieldID Steven Simpson <ss@domain.invalid> - 2013-09-13 13:31 +0100
Re: JNI and GetFieldID "Borneq" <borneq@antyspam.hidden.pl> - 2013-09-14 18:50 +0200
Re: JNI and GetFieldID "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-09-19 15:02 +0100
csiph-web