9share
#include
#include
static int a=99;
void *create(void *arg)
{
printf("new pthread ... /n");
printf("in thread a=%d /n",a);
return (void *)0;
}
int main(int argc,char *argv[])
{
pthread_t tidp;
int error;
int a=9;
printf("in main a = %d/n",a);
error=pthread_create(&tidp, NULL, create, NULL);
if(error!=0)
{
printf("new thread is not create ... /n");
9share最先出现在Python成神之路。
共有 0 条评论