| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 
 |  
 
typedef struct tag_threadData {
 
	jobject tile;
....
 
} threadData;
 
JNIEXPORT void JNICALL Java_com_cciti_viewer_gui_swt_view_Painter_drawTile(JNIEnv *env, jobject obj, jint hdc, jobject tile) {
 
threadData *p_threadData = NULL;
	p_threadData = malloc(sizeof(threadData));
 
p_threadData->tile=tile; ????? comment copier tile car on connait pas sa taille en octet donc difficiele de faire un memecpy
 
	pthread_t thread;
 
	pthread_mutex_lock(&mutex);
	printf("CREATION THREAD\n");
 
	int rc = pthread_create(&thread, NULL, thread_draw, (void *)p_threadData);
 
	if(rc) {
		fprintf(stderr, "Erreur lors de la création du thread - le code de retour de pthread_create() est %d -\n", rc);
		exit(EXIT_FAILURE);
	}
}
 
void *thread_draw(void *p_param) {.......} | 
Partager