当前位置: 首页>>代码示例>>C++>>正文


C++ rtx_dbug_outs函数代码示例

本文整理汇总了C++中rtx_dbug_outs函数的典型用法代码示例。如果您正苦于以下问题:C++ rtx_dbug_outs函数的具体用法?C++ rtx_dbug_outs怎么用?C++ rtx_dbug_outs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了rtx_dbug_outs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: test6

/* third party dummy test process 6 */ 
void test6()
{
	rtx_dbug_outs((CHAR *)"\r\nTest6 Round #1");
	int success = 0;
	int failure = 0;
	int i;
	
	for(i=0; i<32; i++){
		received = g_test_fixture.request_memory_block();
		if(received != 0x00){
			*((CHAR*)received+64) = 'W';
			success++;
			rtx_dbug_outs((CHAR *)"\r\nPASS");
		} else {
			failure++;
			rtx_dbug_outs((CHAR *)"\r\nFAIL: fails to request memory block.");
		}
	}
	
	for(i=0; i<32; i++){
		return_value = g_test_fixture.send_message(1,mblocks[i]);
		if(return_value >= 0){
			success++;
			rtx_dbug_outs((CHAR *)"\r\nPASS");
		} else {
			failure++;
			rtx_dbug_outs((CHAR *)"\r\nFAIL: fails to send message.");
		}
	}
	
	success_rate(success, failure);
  	g_test_fixture.release_processor();
	return;
}
开发者ID:Bhavya,项目名称:Pea-OS,代码行数:35,代码来源:rtx_test_user_procs.c

示例2: uart

void uart() {
	struct io_message * msg = NULL;
	
	while(1) {
		#ifdef _IO_DEBUG
			rtx_dbug_outs((CHAR *) "Enter: uart - waiting for message\r\n");
		#endif
		
		msg = (io_message *)receive_message(NULL);

		#ifdef _IO_DEBUG
			rtx_dbug_outs((CHAR *) "Enter: uart - received message\r\n");
		#endif
		
		char_out = msg->msg[0];
		release_memory_block((void *)msg);
		
		// irene said this is OK
		while( !(SERIAL1_UCSR & 4) ) { }

		// write data to port
		SERIAL1_WD = char_out;
		
		#ifdef _IO_DEBUG
			rtx_dbug_outs((CHAR *) "Writing data: ");
			rtx_dbug_out_char(char_out);
			rtx_dbug_outs((CHAR *) "\r\n");
		#endif
	}
}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:30,代码来源:uart.c

示例3: test4

void test4()
{
    
    VOID * tmp41;
    UINT8 tmp4;
    while (1) 
    {
		rtx_dbug_out_char('4');
		rtx_dbug_outs("\r\n");
		
		g_test_fixture.receive_message(&tmp4);
				
                if(tmp4 == 2){
                   rtx_dbug_outs("4 Received Message From 2 \r\n");
                }else{
                   rtx_dbug_outs("ERROR 42 \r\n");
                }
		
	       tmp41 = g_test_fixture.request_memory_block();
               g_test_fixture.send_message(3, tmp41);

        	
//		g_test_fixture.release_processor();
    }
}
开发者ID:Josh-L,项目名称:OS-Kernel,代码行数:25,代码来源:rtx_test_messaget1.c

示例4: mem_test5

//Second part to the test (Test 4)
void mem_test5() {
	rtx_dbug_outs("Starting Memory Test 5\r\n");
	
	//request 31 blocks of mem (Mem should now fill up)
	void * testArray[32];
	
	//request 31 memory blocks
	int i;
	for (i = 0; i < 31; i++) {
		testArray[i] = request_memory_block();
	}
	
	//print_availible_mem_queue();
	//print_used_mem_queue();	
	
	rtx_dbug_outs("Requested 31 blocks. Requesting one more\r\n");
	
	//this should get blocked
	testArray[31] = request_memory_block();
	
	//PROC 4 SHOULD HAPPEN BEFORE THIS AND SHOULD RELEASE IT'S MEMORY
	rtx_dbug_outs_int("Got Block! Address is: \r\n", (int)testArray[31]);
	
	//release all memory blocks
	for (i = 0; i < 32; i++) {
		release_memory_block(testArray[i]);
	}
	
	//print_availible_mem_queue();
	//print_used_mem_queue();	
	
	rtx_dbug_outs("Finished Memory Test 5\r\n");
	
}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:35,代码来源:mem_test.c

示例5: init

/**
 * @brief: Handles all the initilization of the OS
 * @param: stack_start the start of free memory
 */
void init(void* memory_start) {

#ifdef INIT_DEBUG
    rtx_dbug_outs("Initilizating memory...");
#endif

    init_memory(memory_start);

#ifdef INIT_DEBUG
    rtx_dbug_outs("done\r\nInitilizating processes...");
#endif

    init_processes(memory_head);

#ifdef INIT_DEBUG
    rtx_dbug_outs(" done\r\nInitializing priority queues...");
#endif

    init_priority_queues();

#ifdef INIT_DEBUG
    rtx_dbug_outs(" done\r\nInitilizating interrupts...");
#endif

    init_interrupts();

    g_profiler.timer = &timer;

#ifdef INIT_DEBUG
    rtx_dbug_outs(" done\r\n");
#endif

}
开发者ID:brridder,项目名称:ECE354-RTOS,代码行数:37,代码来源:init.c

示例6: process2

void process2() {

	MessageEnvelope * newmessageproc2 = (MessageEnvelope *)g_test_fixture.receive_message(NULL);

	if (newmessageproc2->tx == g_test_proc[0].pid) { 
		
		#ifdef _TEST_DEBUG
		rtx_dbug_outs((CHAR *)"G04_test: test 4 OK\n\r");
		success_count++;
	#endif
		

	} else {
		
		#ifdef _TEST_DEBUG
		rtx_dbug_outs((CHAR *)"G04_test: test 4 FAIL\r\n");
		fail_count++;
	#endif
		
	}

	g_test_fixture.release_memory_block(newmessageproc2);

	//sends message to proc 1
	proc2toproc1 = g_test_fixture.request_memory_block();
	g_test_fixture.send_message(g_test_proc[1].pid, proc2toproc1);
	
	//sends a message to master
	VOID * proc2tomaster = g_test_fixture.request_memory_block();
	g_test_fixture.send_message(g_test_proc[0].pid, proc2tomaster);
	
}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:32,代码来源:rtx_test.c

示例7: mem_test6

//this tests removing arbitrary blocks from used mem queue
void mem_test6() {
	rtx_dbug_outs("Starting Memory Test 6\r\n");
	
	//request half of the blocks
	void * testArray[16];
	
	//print_availible_mem_queue();
	//print_used_mem_queue();	
	
	int i;
	for (i = 0; i < 16; i++) {
		testArray[i] = request_memory_block();
	}

	rtx_dbug_outs("Blocks requested\r\n");
	
	//remove some from the middle
	release_memory_block(testArray[4]);
	release_memory_block(testArray[10]);
	
	//print_availible_mem_queue();
	//print_used_mem_queue();	
	
	//release all memory blocks
	for (i = 0; i < 16; i++) {
		if (i != 4 && i != 10) {
			release_memory_block(testArray[i]);
		}
	}
	
	rtx_dbug_outs("Finished Memory Test 6\r\n");
	
}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:34,代码来源:mem_test.c

示例8: main

int main( VOID )
{
    int i;
    void* p_mem_array[NUM_MEM_BLKS];

    init_memory();

    for ( i=0; i< NUM_MEM_BLKS; i++ ) 
    {
        p_mem_array[i] = s_request_memory_block();
        if (p_mem_array[i] == NULL) {
            rtx_dbug_outs((CHAR *) "Null pointer.\r\n");
        } else if (p_mem_array[i] > 0x10200000) {
            rtx_dbug_outs((CHAR *) "Memory out of bound. \r\n");
        } else {
            rtx_dbug_outs((CHAR *) "Request memory block: almost OK\r\n");
        }
    }

    for ( i=0; i< NUM_MEM_BLKS; i++ ) 
    {
        int temp;
        temp = s_release_memory_block( p_mem_array[i] );
        if (temp == 0 ) {
            rtx_dbug_outs((CHAR *) "Release memory block: OK\r\n");
        } else {
            rtx_dbug_outs((CHAR *) "Release memory block: Failed \r\n");
        }
    }

    return 0;
}
开发者ID:brridder,项目名称:ECE354-RTOS,代码行数:32,代码来源:main.c

示例9: process4

void process4() {
	MessageEnvelope * newmessage = (MessageEnvelope *)g_test_fixture.receive_message(NULL);
	
	if(newmessage->tx != g_test_proc[0].pid) {
		#ifdef _TEST_DEBUG
		rtx_dbug_outs((CHAR *)"G04_test: test 12 FAIL\n\r");
		fail_count++;
		#endif
	} else if(newmessage->rx != g_test_proc[4].pid) {
		#ifdef _TEST_DEBUG
		rtx_dbug_outs((CHAR *)"G04_test: test 12 FAIL\n\r");
		fail_count++;
		#endif
	} else {
		#ifdef _TEST_DEBUG
		rtx_dbug_outs((CHAR *)"G04_test: test 12 OK\n\r");
		success_count++;
		#endif
	}
	
	g_test_fixture.release_memory_block(newmessage);
	
	//Immediately send a msg back to the master
	VOID * proc4_to_master = g_test_fixture.request_memory_block();
	g_test_fixture.send_message(g_test_proc[0].pid, proc4_to_master);

}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:27,代码来源:rtx_test.c

示例10: process5

void process5() {
	int failed = 0;
	
	int i;
	for (i = 42; i < 72; i ++) {
		MessageEnvelope * newmessage = (MessageEnvelope *)g_test_fixture.receive_message(NULL);
		
		if (newmessage->type != i) {
			failed = 1;
			//rtx_dbug_outs_int("test 16 - expected: ", i - 42);
			//rtx_dbug_outs_int("test 16 - got: ", newmessage->type - 42);
		}

		g_test_fixture.release_memory_block(newmessage);
	}

	if (failed) {
		#ifdef _TEST_DEBUG
		rtx_dbug_outs("G04_test: test 16 FAIL\r\n");
		#endif

		fail_count ++;
	} else {
		#ifdef _TEST_DEBUG
		rtx_dbug_outs("G04_test: test 16 OK\n\r");
		#endif

		success_count++;
	}

	g_test_fixture.delayed_send(g_test_proc[0].pid, g_test_fixture.request_memory_block(), 50);
}
开发者ID:mikesoares,项目名称:ece_354_real_time_operating_system_group_04,代码行数:32,代码来源:rtx_test.c

示例11: test3

void test3()
{
  
    UINT8 tmp3;
    while (1) 
    {
		rtx_dbug_out_char('3');
		rtx_dbug_outs("\r\n");
		g_test_fixture.receive_message(&tmp3);
		
		if(tmp3 == 4){
		   rtx_dbug_outs("3 Received Message From 4 \r\n");
		}else{
		   rtx_dbug_outs("ERROR 34 \r\n");
		}
	
		
                g_test_fixture.receive_message(&tmp3);

                if(tmp3 == 5){
                   rtx_dbug_outs("3 Received Message From 5 \r\n");
                }else{
                   rtx_dbug_outs("ERROR 35 \r\n");
                }
	
//		g_test_fixture.release_processor();
    }
}
开发者ID:Josh-L,项目名称:OS-Kernel,代码行数:28,代码来源:rtx_test_messaget1.c

示例12: test2

/* third party dummy test process 2 */ 
void test2()
{
	void* newMsg = g_test_fixture.request_memory_block();
	*((char *)newMsg + 64) = 'c';
	rtx_dbug_outs("Gid_test: TEST2 delay send message from PID1 with 8 second\r\n");
	g_test_fixture.delayed_send(1, newMsg, 8000);
	
	void* newMsg2 = g_test_fixture.request_memory_block();
	*((char *)newMsg2 + 64) = 'a';
	rtx_dbug_outs("Gid_test: TEST2 delay send message from PID1 with 4 second\r\n");
	g_test_fixture.delayed_send(1, newMsg2, 4000);
	
	while (1) {
		g_test_fixture.release_processor();
	}
	
	// nobody sends message to test2. should be blocked forever
	/*int sender;
	void* msg = g_test_fixture.receive_message(&sender);
	int fail = *((int*)msg+26);
	rtx_dbug_outs("Gid_test: TEST1 received message from PID");
	rtx_dbug_out_char(*sender+48);
	rtx_dbug_outs("\r\n");
	fail++;
	rtx_dbug_outs("Gid_test: test 1 FAIL\r\n");
	g_test_fixture.release_memory_block(msg);*/
}
开发者ID:w6hu,项目名称:NYJW,代码行数:28,代码来源:rtx_test_dummy.c

示例13: success_rate

void success_rate(int success, int failure){
	if(failure == 0){
		rtx_dbug_outs((CHAR *)"\r\nOVERALL: PASS\r\n");
	} else {
		rtx_dbug_outs((CHAR *)"\r\nOVERALL: FAIL\r\n");
	}
	RTX_SUCCESS_COUNT += success;
	RTX_FAIL_COUNT += failure;
	return;
}
开发者ID:Bhavya,项目名称:Pea-OS,代码行数:10,代码来源:rtx_test_user_procs.c

示例14: __attribute__

void  __attribute__ ((section ("__REGISTER_RTX__"))) register_rtx() {
    rtx_dbug_outs((CHAR *)"rtx: Entering register_rtx()\r\n");
    g_test_fixture.send_message = send_message;
    g_test_fixture.receive_message = receive_message;
    g_test_fixture.request_memory_block = request_memory_block;
    g_test_fixture.release_memory_block = release_memory_block;
    g_test_fixture.release_processor = release_processor;
    g_test_fixture.delayed_send = delayed_send;
    g_test_fixture.set_process_priority = set_process_priority;
    g_test_fixture.get_process_priority = get_process_priority;
    rtx_dbug_outs((CHAR *)"rtx: leaving register_rtx()\r\n");
}
开发者ID:gkcampbe,项目名称:ECE354,代码行数:12,代码来源:main_rtx.c

示例15: test5

/* third party dummy test process 5 */ 
void test5()
{	
	rtx_dbug_outs("Gid_test: TEST5 sets priority of PID6 to 2\r\n");
	g_test_fixture.set_process_priority(6, 2);
	
	void* newMsg = g_test_fixture.request_memory_block();
	rtx_dbug_outs("Gid_test: TEST5 sends message to PID4\r\n");
	g_test_fixture.send_message(4, newMsg);
	
	while (1) {
		g_test_fixture.release_processor();
	}
}
开发者ID:w6hu,项目名称:NYJW,代码行数:14,代码来源:rtx_test_dummy.c


注:本文中的rtx_dbug_outs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。