nanogui: nxclient 1010: Wrong packet type 0 (expected 22)


Previous by date: 24 May 2005 03:40:29 +0100 Re: keyboard and viewml problem, Greg Haerr
Next by date: 24 May 2005 03:40:29 +0100 Re: Using FLTK 1.1.6 on microwindow, Steven Scholz
Previous in thread: 24 May 2005 03:40:29 +0100 Re: nxclient 1010: Wrong packet type 0 (expected 22), Greg Haerr
Next in thread:

Subject: Re: [nanogui] nxclient 1010: Wrong packet type 0 (expected 22)
From: "Lee, KwangSub" ####@####.####
Date: 24 May 2005 03:40:29 +0100
Message-Id: <42929422.5070709@wisegram.com>

Thank you Greg Haerr.

I solve this problem.
I used pthread_mutex_lock().

I writing Code.

first thread code.
=> Event Loop Thread

while (1)
{
pthread_mutex_lock(&test_m);
GrCheckNextEvent(&event);

switch(event.type)
{
case : ......
.......
}
pthread_mutex_unlock(&test_m);

}


second thread code.
=> Update The Screen Func.

UpdateScreen(int x, int y, int w, int h );
{
gc = GrNewGC();

pthread_mutex_lock(&test_m);

Thank you Greg Haerr.

I solve this problem.
I used pthread_mutex_lock().

I writing Code.

first thread code.
=> Event Loop Thread

while (1)
{
pthread_mutex_lock(&test_m);
GrCheckNextEvent(&event);

switch(event.type)
{
case : ......
.......
}
pthread_mutex_unlock(&test_m);

}


second thread code.
=> Update The Screen Func.

UpdateScreen(int x, int y, int w, int h );
{
gc = GrNewGC();

pthread_mutex_lock(&test_m);

GrArea(wPixmap, gc, x, y, w, h, ScreenBuffer, MWPF_TRUECOLOR565);

GrCopyArea(wID, gc, x, y, w, h, wPiamap, x, y, 0 );

GrDestroyGC(gc);

pthread_mutex_unlock(&test_m);
}

.................................................

But very slow speed.

I tried to fix for slow speed.

PS. I'm sorry. I poor english.


Greg Haerr wrote:


>>: I program by nano-X with multi thread.(I used Pthread Library)
>>: 
>>: I tried to draw pixel to nano-X under linux-arm.
>>: 
>>: nono-X configs SET.
>>: THREAD_SAFE = Y
>>: 
>>: But. remain the error message.
>>: 
>>: nxclient 1010: Wrong packet type 6 (expected 22)
>>
>>My first guess is that the LOCK/UNLOCK macros,
>>which call the underlying threadsafe mechanism,
>>isn't working.  Check include/lock.h, and make sure
>>you've compiled everything with the required 
>>thread-safe defines in the gcc command line.  
>>Set VERBOSE=Y to check this.
>>
>>Regards,
>>
>>Greg
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ####@####.####
>>For additional commands, e-mail: ####@####.####
>>  
>>
>  
>


GrArea(wPixmap, gc, x, y, w, h, ScreenBuffer, MWPF_TRUECOLOR565);

GrCopyArea(wID, gc, x, y, w, h, wPiamap, x, y, 0 );

GrDestroyGC(gc);

pthread_mutex_unlock(&test_m);
}

.................................................

But very slow speed.

I tried to fix for slow speed.

PS. I'm sorry. I poor english.


Greg Haerr wrote:


>>: I program by nano-X with multi thread.(I used Pthread Library)
>>: 
>>: I tried to draw pixel to nano-X under linux-arm.
>>: 
>>: nono-X configs SET.
>>: THREAD_SAFE = Y
>>: 
>>: But. remain the error message.
>>: 
>>: nxclient 1010: Wrong packet type 6 (expected 22)
>>
>>My first guess is that the LOCK/UNLOCK macros,
>>which call the underlying threadsafe mechanism,
>>isn't working.  Check include/lock.h, and make sure
>>you've compiled everything with the required 
>>thread-safe defines in the gcc command line.  
>>Set VERBOSE=Y to check this.
>>
>>Regards,
>>
>>Greg
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ####@####.####
>>For additional commands, e-mail: ####@####.####
>>  
>>
>  
>


Previous by date: 24 May 2005 03:40:29 +0100 Re: keyboard and viewml problem, Greg Haerr
Next by date: 24 May 2005 03:40:29 +0100 Re: Using FLTK 1.1.6 on microwindow, Steven Scholz
Previous in thread: 24 May 2005 03:40:29 +0100 Re: nxclient 1010: Wrong packet type 0 (expected 22), Greg Haerr
Next in thread:


Powered by ezmlm-browse 0.20.