Astronet Поиск по астрономическим сайтам English Russian
       
        Точная форма слов   О проекте   Сайты   Справка
Поиск по:jet.sao.ru   - Поискать по всем серверам
На этой странице приведены все страницы сервера jet.sao.ru ,которые мы индексируем. Показаны документы 2081 - 2100 из 5951.

В начало ] Пред. | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | След.В конец ]

Упорядочить по: URL  |  дате изменения
2081. Remote Procedure Calls (RPC)
... Defining Client and Server Application Code . ... This chapter provides an overview of Remote Procedure Calls (RPC) RPC. ... rls.c: remote directory listing client */ # include stdio.h # include strings.h # include rpc / rpc .h # include rls.h main (argc, argv) int argc; char *argv[]; { char dir[DIR_SIZE]; /* call the remote procedure if registered */ strcpy(dir, argv[2]); read_dir(argv[1], dir); /* read_dir(host, directory) */ /* spew-out the results and bail ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node33.html -- 36.5 Кб -- 02.10.2012
Похожие документы

2082. Thread programming examples
... Using Many Threads . ... define _REENTRANT #include stdio.h #include thread .h /* Function prototypes for thread routines */ void *sub_a( void *); void *sub_b( void *); void *sub_c( void *); void *sub_d( void *); void *sub_e( void *); void *sub_f( void *); thread _t thr_a, thr_b, thr_c; void main() { thread _t main_thr; main_thr = thr_self(); printf( Main ... The example demonstrates how tricky some programming issues can be when you deal with threads. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node32.html -- 113.9 Кб -- 02.10.2012
Похожие документы

2083. Further Threads Programming:Synchronization
... Condition Variable Attributes . ... Threads and Semaphores . ... Mutual exclusion locks (mutexes) are a comon method of serializing thread execution. ... The function pthread_cond_wait() is used to atomically release a mutex and to cause the calling thread to block on the condition variable. ... To wait for a condition use int cond_wait(cond_t *cv, mutex_t *mp) which atomically releases the mutex pointed to by mp and to cause the calling thread to block on the condition variable pointed to by cv . ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node31.html -- 45.8 Кб -- 02.10.2012
Похожие документы

2084. Further Threads Programming:Thread Attributes (POSIX)
... Attributes . Initializing Thread Attributes . ... Thread Stack Size . ... include <pthread.h> pthread_attr_t tattr; pthread_t tid; void *start_routine; void arg int ret; /* initialized with default attributes */ ret = pthread_attr_init(&tattr); /* call an appropriate functions to alter a default value */ ret = pthread_attr_*(&tattr,SOME_ATRIBUTE_VALUE_PARAMETER); /* create the thread */ ret = pthread_create(&tid, &tattr, start_routine, arg); . ... thread . ... stack size. priority New thread . ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node30.html -- 29.4 Кб -- 02.10.2012
Похожие документы

2085. Threads: Basic Theory and Libraries
... Processes and Threads . ... int pthread_create(pthread\_t *tid, const pthread\_attr\_t *tattr, void*(*start_routine)(void *), void *arg); . ... When either of the following conditions occurs, the pthread_setschedparam() function fails and returns an error value. int pthread_getschedparam(pthread_t tid, int policy, struct schedparam *param) gets the priority of the existing thread. ... The int thr_join(thread_t tid, thread_t *departedid, void **status) function to wait for a thread to terminate. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node29.html -- 72.6 Кб -- 02.10.2012
Похожие документы

2086. IPC:Sockets
... Socket Creation and Naming . ... Example Socket Programs: socket_server.c,socket_client . ... A socket domain is an abstraction that provides an addressing structure and a set of protocols. ... Twenty three socket domains are identified (see < sys/socket.h >), of which only the UNIX and Internet domains are normally used Solaris 2.x Sockets can be used to communicate between processes on a single system, like other forms of IPC. ... Several functions to send and receive data from a SOCK_STREAM...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node28.html -- 16.5 Кб -- 02.10.2012
Похожие документы

2087. IPC:Shared Memory
... Accessing a Shared Memory Segment . ... The following code illustrates shmget() : #include sys/types.h #include sys/ ipc .h #include sys/shm.h ... key_t key; /* key to be passed to shmget() */ int shmflg; /* shmflg to be passed to shmget() */ int shmid ; /* return value from shmget() */ int size; /* size to be passed to shmget() */ ... key = ... size = ... shmflg) = ... if (( shmid = shmget (key, size, shmflg)) == -1) { perror( shmget: shmget failed ); exit(1); } else { ( ... IPC_STAT ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node27.html -- 39.0 Кб -- 02.10.2012
Похожие документы

2088. IPC:Semaphores
... Initializing a Semaphore Set . Controlling Semaphores . ... It gives up * immediately if any control operation fails, so be careful not to * set permissions to preclude read permission; you won't be able to * reset the permissions with this code if you do. */ #include stdio.h #include sys/types.h #include sys/ ipc .h #include sys/sem.h #include time.h struct semid _ds semid _ds; static void do_semctl(); static void do_stat(); extern char *malloc(); extern void exit(); extern ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node26.html -- 41.5 Кб -- 02.10.2012
Похожие документы

2089. IPC:Message Queues:<sys/msg.h>
... Initialising the Message Queue . ... Controlling message queues . ... The queue is removed. ... read permission; you won't be * able to reset the permissions with this code if you do. */ #include stdio.h #include sys /types.h #include sys / ipc .h #include sys / msg.h #include time.h static void do_msgctl(); extern void exit(); extern void perror(); static char warning_ message [] = If you remove read permission for \ yourself, this program will fail frequently! ; main() {...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node25.html -- 35.4 Кб -- 02.10.2012
Похожие документы

2090. IPC:Interrupts and Signals: <signal.h>
... int kill(int pid, int signal) - a system call that send a signal to a process, pid . ... sig_talk.c --- Example of how 2 processes can talk */ /* to each other using kill () and signal () */ /* We will fork() 2 process and let the parent send a few */ /* signals to it`s child */ /* cc sig_talk.c -o sig_talk */ #include stdio.h #include signal.h void sighup(); /* routines child will call upon sigtrap */ void sigint (); void sigquit(); main() { int pid ; /* get child process */ if ((...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node24.html -- 13.3 Кб -- 02.10.2012
Похожие документы

2091. Interprocess Communication (IPC), Pipes
... Piping in a C program: < stdio.h > . ... Pipes . ... We use fprintf() and fscanf() to communicate with the pipe's stream . ... plotter.c module */ /* contains routines to plot a data file produced by another program */ /* 2d data plotted in this version */ /**********************************************************************/ #include externals.h static FILE * plot1 , *plot2, *ashell; static char *startplot1 = plot [] [0:1.1]'plot11.dat' with lines, 'plot12.dat' with lines\n ; static ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node23.html -- 10.3 Кб -- 02.10.2012
Похожие документы

2092. Process Control: <stdlib.h>,<unistd.h>
... fork() . ... A process is basically a single running program. ... System is prototyped in <stdlib.h> . ... Each command and sorresponding arguments are put in a args array */ /* execvp is called to execute these commands in child process */ /* spawned by fork () */ /* cc -o fork fork .c */ #include stdio.h #include sys/types.h #include unistd.h main() { char buf [1024]; char * args [64]; for (;;) { /* * Prompt for and read a command. */ printf( Command: ); if (gets( ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node22.html -- 11.7 Кб -- 02.10.2012
Похожие документы

2093. Time Functions
... Basic time functions . ... Example 2: Set a random number seed . ... Uses of time functions include: . ... time_t time(time_t *tloc) -- returns the time since 00:00:00 GMT, Jan. 1, 1970 , measured in seconds. ... timer.c */ #include <stdio.h> #include <sys/types.h> #include <time.h> main() { int i; time_t t1,t2; (void) time(&t1); for (i=1;i<=300;++i) printf(``%d %d %d n'',i, i*i, i*i*i); (void) time(&t2); printf(`` n Time to do 300 squares and cubes= %d seconds n'', (int) t2-t1); } . ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node21.html -- 8.0 Кб -- 02.10.2012
Похожие документы

2094. File Access and Directory System Calls
... This basically involves calling appropriate functions to traverse a directory hierarchy or inquire about a directories contents. int chdir(char *path) -- changes directory to specified path string. ... There are many system calls that can applied directly to files stored in a directory. int access(char *path, int mode) -- determine accessibility of file. path points to a path name naming a file. access() checks the named file for accessibility according to mode , defined in #include <unistd.h> : . ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node20.html -- 17.1 Кб -- 02.10.2012
Похожие документы

2095. String Handling: <string.h>
... Basic String Handling Functions . ... Character conversions and testing: ctype.h . ... char *stpcpy ( const char *dest, const char *src) -- Copy one string into another. int strcmp( const char *string1, const char *string2) - Compare string1 and string2 to determine alphabetic order. char *strcpy( const char *string1, const char *string2) -- Copy string2 to stringl. char *strerror( int errnum) -- Get error message corresponding to specified error number ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node19.html -- 14.1 Кб -- 02.10.2012
Похожие документы

2096. Input and Output (I/O):stdio.h
... Reading and writing files . ... Your programs will need to include the standard I/O header file so do: . ... So if we are expecting input from the keyboard for a program, in we can read similar input from a file . ... int scanf(char *format, args....) -- reads from stdin and puts input in address of variables specified in args list. ... The functions fprintf and fscanf a commonly used to access files. int fprintf(FILE *stream, char *format, args..) int fscanf(FILE *stream, char *format, args.. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node18.html -- 23.3 Кб -- 02.10.2012
Похожие документы

2097. Mathematics: <math.h>
... Mathematics is relatively straightforward library to use again. ... double x; x = sqrt(63.9); . ... double acos( double x) -- Compute arc cosine of x. double asin( double x) -- Compute arc sine of x. double atan( double x) -- Compute arc tangent of x. double atan2( double y, double x) -- Compute arc tangent of y/x. double ceil( double x) -- Get smallest integral value that exceeds x. double cos( double x) -- Compute cosine of angle in radians ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node17.html -- 7.0 Кб -- 02.10.2012
Похожие документы

2098. Integer Functions, Random Number, String Conversion, Searching and Sorting:
... Arithmetic Functions . Random Numbers . String Conversion . Searching and Sorting . ... There are 4 basic integer functions: . int abs(int number); long int labs(long int number); div_t div(int numerator,int denominator); ldiv_t ldiv(long int numerator, long int denominator); . ... In practice no functions produce truly random data -- they produce pseudo-random numbers. ... The stdlib.h provides 2 useful functions to perform general searching and sorting of data on any type. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node16.html -- 11.9 Кб -- 02.10.2012
Похожие документы

2099. C, UNIX and Standard Libraries
... Using UNIX System Calls and Library Functions . ... To use system calls and library functions in a C program we simply call the appropriate C function. Examples of standard library functions we have met include the higher level I/O functions -- fprintf() , malloc() .. ... For most system calls and library functions we have to include an appropriate header file. e.g. stdio.h, math.h . ... Information on nearly all system calls and library functions is available in manual pages. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node15.html -- 6.1 Кб -- 02.10.2012
Похожие документы

2100. The C Preprocessor
... Preprocessor Compiler Control . ... This directive includes a file into code. ... include <file> or #include ``file'' . ... As another example if running program on MSDOS machine we want to include file msdos.h otherwise a default.h file. ... This is most often used with programs that translate other languages to C. For example, error messages produced by the C compiler can reference the file name and line numbers of the original source files instead of the intermediate C (translated) source files. ...
[ Сохраненная копия ]  Ссылки http://jet.sao.ru/hq/sts/linux/book/c_marshall/node14.html -- 11.1 Кб -- 02.10.2012
Похожие документы

В начало ] Пред. | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | След.В конец ]

Rambler's Top100 RFBR Яндекс цитирования