📄 root.c
字号:
/*
* +-------------------------------------------------------------------+
* | Copyright (c) 1999,2000 TriMedia Technologies Inc. |
* | |
* | This software is furnished under a license and may only be used |
* | and copied in accordance with the terms and conditions of such a |
* | license and with the inclusion of this copyright notice. This |
* | software or any other copies of this software may not be provided |
* | or otherwise made available to any other person. The ownership |
* | and title of this software is not transferred. |
* | |
* | The information in this software is subject to change without |
* | any prior notice and should not be construed as a commitment by |
* | TriMedia Technologies. |
* | |
* | This code and information is provided "as is" without any |
* | warranty of any kind, either expressed or implied, including but |
* | not limited to the implied warranties of merchantability and/or |
* | fitness for any particular purpose. |
* +-------------------------------------------------------------------+
*
*
* Module name : root.c 1.9
*
* Last update : 14:58:13 - 00/06/19
*
* Title : Psos-based IO test program
*
* Description : This is an IO test program for demonstrating
* serial I/O over tcp/ip. It starts the
* tcp-based serial driver (by calling function
* SerialRPC_start right after timer initialization,
* in the root function), and then starts an instance
* of the familiar 'files' test.
*
*/
/*--------------------------- Includes ---------------------------------------*/
#include <tmlib/tmtypes.h>
#include <stdio.h>
#include <psos.h>
#include <pna.h>
#include "sys_conf.h"
#include "assert.h"
/*--------------------------- Definitions ------------------------------------*/
#define NROF_ITERATIONS 10000
#define MAX_FILE_SIZE 100000
/*------------------------------------ I/O test ------------------------------*/
extern void write_read_test
(String prefix,
Int count,
Int task,
Bool multitask,
Int max_file_size
);
void
files()
{
Int i;
printf("--------------- START OF FILES TEST --------------\n");
for (i = 0; i < NROF_ITERATIONS; i++) {
write_read_test("", i, 0, False, MAX_FILE_SIZE);
}
printf("------------- SUCCESSFULL TERMINATION ------------\n");
}
void
root()
{
SerialRPC_start();
printf("Standalone Set Top Box Started\n");
files();
printf("Standalone Set Top Box Stopped\n");
_psos_exit(-1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -