2012年5月4日星期五

grossiste vetement chine1

The following code is improved version, using multiple threads to achieve the card reader card reader.# include < pthread.h> include" reader.h" #; void * create (void * ARG) {while (1) {printf (" thread is Running.
.. Sleep. ".); (5);}} void * ReaderThread (void * ARG) {int reader_fd; char buf [32]; if ((reader_fd = OpenReader (" dev / tty0" /;)) = = 1) {puts (" Open Dev Error! R n");} while (1) {if (ReadId (reader_fd, buf, 32) = = 1) {printf (" Read ID =%s R n" grossiste vetement chine, buf);}}; CloseReader (reader_fd);} int main (int argc, char * argv []) {pthread_t tidp; int RC1, RC2; RC1 = pthread_create (& tidp, NULL, create, NULL); if (RC1! = 0) {printf (" pthread_create is not created.
.. R n" return 1;}); printf (" prthread_create is created... R n"); RC2 = pthread_create (& tidp, NULL, ReaderThread, NULL); if (RC2! = 0) {printf (" ReaderThread is not created.
Source by the beats by dre relate article:

没有评论:

发表评论