コード例 #1
0
ファイル: static_local_var.c プロジェクト: ycqiu/demos-linux
int main(int argc, char** argv, char** envp) {
	printHello();
	printHello();
	printHello();
	printHello();
	return EXIT_SUCCESS;
}
コード例 #2
0
int main(int argc, char *argv[])
{
	printHello();
	initEnv();

	char *line = new char[MAX_LINE_SIZE + 1];
	for (;;) {
		int lineLen;

		assert(write(1, "% ", 2) > 0);
		lineLen = read(0, line, MAX_LINE_SIZE * sizeof(char));
		if (lineLen == 0)
			break;
		line[lineLen] = '\0';
		try {
			parseLine((const char **)&line);
		}
		catch (const std::string &func) {
			closePrevPipe();
			assert(write(2, func.c_str(), func.size() * sizeof(char)) > 0);
			assert(write(2, "\n", 1) > 0);
		}
	}
	delete [] line;

	return 0;
}
コード例 #3
0
ファイル: p2.c プロジェクト: pranavtbhat/PPSolutions
void main(){
    #pragma omp parallel
        {
            int tid = omp_get_thread_num();
            printHello(tid);
        }
}
コード例 #4
0
void doTheThing(int type){
    if (type == 0) {
        printHello();
    }else{
        printGoodbye();
    }
    
    return 0;
}
コード例 #5
0
ファイル: test_queue.cpp プロジェクト: flit/argon-rtos
void TestQueue1::consumer_b_thread()
{
    printHello();

    while (1)
    {
        int value = m_q.receive();
        printf("%s received %d\r\n", threadIdString(), value);
    }
}
コード例 #6
0
ファイル: test_queue.cpp プロジェクト: flit/argon-rtos
void TestQueue1::producer_thread()
{
    printHello();

    int counter = 0;
    while (1)
    {
        int value = ++counter;
        printf("%s sending %d\r\n", threadIdString(), value);
        m_q.send(value);

        Ar::Thread::sleep(2000);
    }
}
コード例 #7
0
ファイル: Home.cpp プロジェクト: bishop986/Study
int main()
{
	printHello();
	return 0;
}
コード例 #8
0
ファイル: helloword.c プロジェクト: tyzy313481929/Cpp
int main(void){
	printHello();
	return 0;
}
コード例 #9
0
ファイル: main.c プロジェクト: BackupTheBerlios/openppa-svn
int main(int argc, char ** argv)
{
	printHello();
	return 0;
}