操作系統(tǒng)課程設(shè)計_進(jìn)程調(diào)度演示源程序 #include "stdio.h" #include "stdlib.h" #include "string.h" typedef struct node { char name[10] /*進(jìn)程標(biāo)識符*/ int prio /*進(jìn)程優(yōu)先數(shù)*/ int round /*進(jìn)程時間輪轉(zhuǎn)時間片*/ int cputime /*進(jìn)程占用CPU時間*/ int needtime /*進(jìn)程到完成還要的時間*/ int count /*計數(shù)器*/ char state /*進(jìn)程的狀態(tài)*/ struct node *next /*鏈指針*/ }PCB
標(biāo)簽: include typedef stdlib string
上傳時間: 2016-08-09
上傳用戶:鳳臨西北
#include<stdio.h> #include<string.h> #include<limits.h> #include<unistd.h> #include<sys/types.h> #define PROMPT_STRING "[myshell]$" #define QUIT_STRING "exit\n" static char inbuf[MAX_CANON] char * g_ptr char * g_lim extern void yylex() int main (void){ for( ){ if(fputs(PROMPT_STRING,stdout)==EOF) continue if(fgets(inbuf,MAX_CANON,stdin)==NULL) continue if(strcmp(inbuf,QUIT_STRING)==0) break g_ptr = inbuf g_lim = inbuf + strlen(inbuf) yylex() } return 0 }
標(biāo)簽: include gt lt limits
上傳時間: 2016-12-31
上傳用戶:colinal
幀緩沖#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <asm/page.h> #include <linux/fb.h> #define TRUE 1 #define FALSE 2 //a framebuffer device structure typedef struct fbdev{ int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix
標(biāo)簽: include lt gt stdlib
上傳時間: 2013-12-11
上傳用戶:bjgaofei
基于終端的訂花系統(tǒng)_socket #include<stdio.h> #include<stdlib.h> #include<errno.h> #include<string.h> #include<sys/types.h> #include<netinet/in.h> #include<sys/socket.h> #include<sys/wait.h> #include<sys/ipc.h> #include<unistd.h> #include<sys/shm.h> #include<sys/stat.h> #define MYPORT 3490 // num of port #define BACKLOG 5 // largest num of accept #define MAXDATASIZE 1
標(biāo)簽: include gt lt socket
上傳時間: 2014-01-18
上傳用戶:003030
#include<stdlib.h> #include "dos.h" #include "graphics.h" #include "math.h" #define PI 3.1415926 #define NULL 0 #include<stdio.h> #include<string.h>
標(biāo)簽: include graphics define stdlib
上傳時間: 2013-12-29
上傳用戶:王者A
#include <avr/io.h> #include <avr/interrupt.h> #include <avr/signal.h> #include <avr/sleep.h> #include <avr/pgmspace.h> #include <string.h> #include <util/delay.h> #include <avr/eeprom.h> #include <stdio.h> #include "defines.h"
標(biāo)簽: include avr interrupt gt
上傳時間: 2017-07-31
上傳用戶:diets
Accessing IDE Hard disk by ATmega32 microcontroller (Proteus simulation include)
標(biāo)簽: microcontroller simulation Accessing Proteus
上傳時間: 2013-09-21
上傳用戶:18888888888
#ifndef __485_C__ #define __485_C__ #include #include #define unsigned char uchar #define unsigned int uint /* 通信命令 */ #define __ACTIVE_ 0x01 // 主機詢問從機是否存在 #define __GETDATA_ 0x02 // 主機發(fā)送讀設(shè)備請求 #define __OK_ 0x03 // 從機應(yīng)答 #define __STATUS_ 0x04 // 從機發(fā)送設(shè)備狀態(tài)信息 #define __MAXSIZE 0x08 // 緩沖區(qū)長度 #define __ERRLEN 12 // 任何通信幀長度超過12則表示出錯 uchar dbuf[__MAXSIZE]; // 該緩沖區(qū)用于保存設(shè)備狀態(tài)信息 uchar dev; // 該字節(jié)用于保存本機設(shè)備號 sbit M_DE = P1^0; // 驅(qū)動器使能,1有效 sbit M_RE = P1^1; // 接收器使能,0有效
上傳時間: 2014-12-26
上傳用戶:604759954
Keil C51開發(fā)系統(tǒng)基本知識3 1. 1. 專用寄存器include文件例如8031、8051均為REG51.h其中包括了所有8051的SFR及其位定義,一般系統(tǒng)都必須包括本文件。2. 2. 絕對地址include文件absacc.h該文件中實際只定義了幾個宏,以確定各存儲空間的絕對地址。3. 3. 動態(tài)內(nèi)存分配函數(shù),位于stdlib.h中 4. 4. 緩沖區(qū)處理函數(shù)位于“string.h”中其中包括拷貝比較移動等函數(shù)如:memccpy memchr memcmp memcpy memmove memset這樣很方便地對緩沖區(qū)進(jìn)行處理。5. 5. 輸入輸出流函數(shù),位于“stdio.h”中流函數(shù)通8051的串口或用戶定義的I/O口讀寫數(shù)據(jù),缺省為8051串口,如要修改,比如改為LCD顯示,可修改lib目錄中的getkey.c及putchar.c源文件,然后在庫中替換它們即可。3. 第三節(jié) Keil C51庫函數(shù)原型列表
標(biāo)簽: Keil C51 開發(fā)系統(tǒng) 基本知識
上傳時間: 2013-11-06
上傳用戶:smallfish
微型打印機的C語言源程序:微型打印機的C51源程序#define uchar unsigned char#define uint unsigned int#include <reg52.h>#include <stdio.h>#include <absacc.h>#include <math.h>#include <string.h>#include <ctype.h>#include <stdlib.h>#define PIN XBYTE[0x8000]#define POUT XBYTE[0x9000]sbit PRINTSTB =P1^6;sbit DOG=P1^7;bdata char pin&#118alue;sbit PRINTBUSY=pin&#118alue^7;sbit PRINTSEL =pin&#118alue^6;sbit PRINTERR =pin&#118alue^5;sbit PRINTACK =pin&#118alue^4; void PrintString(uchar *String1,uchar *String2);void initprint(void);void print(uchar a); void initprint(void) //打印機初始化子程序 { pin&#118alue=PIN; if((PRINTSEL==1)&&(PRINTERR==1)) { print(0x1b); print(0x40); print(0x1b); print(0x38); print(0x4); }}void print(uchar a) //打印字符a{ pin&#118alue=PIN; if((PRINTSEL==0)||(PRINTERR==0)) return; for(;;) { DOG=~DOG; pin&#118alue=PIN; if(PRINTBUSY==0) break; } DOG=~DOG; POUT=a; PRINTSTB=1; PRINTSTB=1; PRINTSTB=1; PRINTSTB=1; PRINTSTB=0; PRINTSTB=0; PRINTSTB=0; PRINTSTB=0; PRINTSTB=1;}void PrintString(uchar *String) //打印字符串后回車{ uchar CH; for (;;) { DOG=~DOG; CH=*String; if (CH==0) { print(0x0d); break; } print(CH); String++; } initprint();}
上傳時間: 2013-10-18
上傳用戶:hasan2015
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1