JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... int bdflush(int func , long data ); 説明 注意 : Linux 2.6 以降では、このシステムコールは非推奨であり、何も行わない。 将来のカーネルのリリースで ... 整 (tune) する。 ( CAP_SYS_ADMIN ケーパビリティ (capability) を持つ) 特権プロセスのみが bdflush () を呼び出すことができる。 func が負か 0 でデーモンが起動されていなれば、 bdflush () はデーモンのコードへ入り、戻ってこない。 func が 1 ならば、 汚れた (d ... irty) バッファーがディスクへと書き込まれる。 func が 2 以上で偶数 (最小ビットが 0) ならば、 address にロングワードでアドレスを指定し、そのアドレスに ( func -2)/2 で指定され ... ... セスごとのメモリー管理テーブルである。 このテーブルに関してのより詳しい情報は Intel 386 processor handbook を 参照すること。 func が 0 ならば、 modify_ldt () は ldt を ptr が指しているメモリーに読み込む。 読み込むバイト数は実際の ldt のサイズか bytecou ... nt より小さい方である。 func が 1 ならば、 modify_ldt () は ldt エントリーの一つを変更する。 ptr は user_desc 構造体を指し、 bytecount はこの構造体の大 ... 返し、 errno をエラーを示す値に設定する。 エラー EFAULT ptr がアドレス空間の外を指している。 EINVAL ptr が 0 である、 または func が 1 で bytecount が modify_ldt_ldt_s 構造体のサイズと等しくないか、 func が 1 で新しい ldt エントリーが無効な値である。 E ... ... PTHREAD_CANCELED かどうかを 確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。 $ ./a.out thread_func(): started; cancellation disabled main(): sending cancellation request thread_func(): about to enable cancellation main(): ... .h > #define handle_error_en(en, msg) \ do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * thread_func(void *ignored_argument) { int s; /* Disable cancellation for a while, so that we don't immediately react to a cancellation ... ead_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); if (s != 0) handle_error_en(s, "pthread_setcancelstate"); printf("thread_func(): started; cancellation disabled\n"); sleep (5); printf("thread_func(): about to enable cancellation\n"); s = pthread_set ... ... _version GDBM_FILE gdbm_open (name, block_size, read_write, mode, fatal_func) char * name; int block_size, read_write, mode; void (*fatal_func) (); void gdbm_close (dbf) GDBM_FILE dbf; int gdbm_store ... ファイルをオープンする手続きは次の通りである。 GDBM_FILE dbf; dbf = gdbm_open ( name, block_size, read_write, mode, fatal_func ) name はファイルの名前である。(完全な名前、gdbm はこの名前に 文字列を付け加えるようなことはしない) block_size はディスクか ... nc モードになったためにもう使われなくなった。 mode はファイルのモードである ( chmod (2) および open (2) を 参照)。 (*fatal_func) () は dbm が致命的エラーを検出した場合に呼び出す 関数である。この関数への唯一のパラメータは文字列である。 値 0 が指定され ... ... ジスターが格納される。 getcontext () 関数は、 ポインター ucp が指す構造体を、 現在アクティブなコンテキストに初期化する。 The function setcontext () restores the user context pointed to by ucp . A successful call does not return. The context should have ... (3) の呼び出しによって得られていたものの場合は、 プログラムの実行はその makecontext (3) 呼び出しの第二引数で指定された関数 func を呼び出すかたちで継続する。 func から返ると、 makecontext (3) 呼び出しの第一引数で指定されていた ucp 構造体の uc_link メン ... ... ジスターが格納される。 getcontext () 関数は、 ポインター ucp が指す構造体を、 現在アクティブなコンテキストに初期化する。 The function setcontext () restores the user context pointed to by ucp . A successful call does not return. The context should have ... (3) の呼び出しによって得られていたものの場合は、 プログラムの実行はその makecontext (3) 呼び出しの第二引数で指定された関数 func を呼び出すかたちで継続する。 func から返ると、 makecontext (3) 呼び出しの第一引数で指定されていた ucp 構造体の uc_link メン ... ... m V-like environment, one has the type ucontext_t (defined in < ucontext.h > and described in getcontext (3)) and the four functions getcontext (3), setcontext (3), makecontext (), and swapcontext () that allow user-level context switching between mu ... k に 代入しなければならない。 このコンテキストが将来 ( setcontext (3) または swapcontext () によって) 有効にされると、関数 func が呼ばれ、 引数として argc 以降の整数 ( int ) 引数の列が渡される。 呼び出し者は argc にこれらの引数の個数を指定しなければな ... の例を示すものである。 このプログラムを実行すると、以下のような出力が得られる: $ ./a.out main: swapcontext(&uctx_main, &uctx_func2) func2: started func2: swapcontext(&uctx_func2, &uctx_func1) func1: started func1: swapcontext(&uctx_func1, &uctx_func2) ... ... m V-like environment, one has the type ucontext_t (defined in < ucontext.h > and described in getcontext (3)) and the four functions getcontext (3), setcontext (3), makecontext (), and swapcontext () that allow user-level context switching between mu ... k に 代入しなければならない。 このコンテキストが将来 ( setcontext (3) または swapcontext () によって) 有効にされると、関数 func が呼ばれ、 引数として argc 以降の整数 ( int ) 引数の列が渡される。 呼び出し者は argc にこれらの引数の個数を指定しなければな ... の例を示すものである。 このプログラムを実行すると、以下のような出力が得られる: $ ./a.out main: swapcontext(&uctx_main, &uctx_func2) func2: started func2: swapcontext(&uctx_func2, &uctx_func1) func1: started func1: swapcontext(&uctx_func1, &uctx_func2) ... ... c int numThreads, numBlocks; #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) static void * thread_func(void *arg) { int tn = (int) arg; /* The multiplier '(2 + tn)' ensures that each thread (including the main thread) allocat ... ate different amounts of memory */ for (int tn = 0; tn < numThreads; tn++) { errno = pthread_create(&thr[tn], NULL, thread_func, (void *) tn); if (errno != 0) errExit("pthread_create"); /* If we add a sleep interval after the start-up of each thread, ... ... を全て表示する。 -t 全てのバス・ブリッジ・デバイスと、それらの間の接続を含む図を木構造で表示する。 -s [[<bus>]:][<slot>][.[<func>]] 指定されたバス (bus)・スロット (slot)・機能 (func) のデバイスのみを表示する。 デバイスの指定の各要素は省略可能で、また ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。