タグ

posixに関するmoozのブックマーク (4)

  • Do I need -D_REENTRANT with -pthreads?

    On Linux (kernel 2.6.5) our build system calls gcc with -D_REENTRANT. Is this still required when using pthreads? How is it related to gcc -pthread option? I understand that I should use -pthread with pthreads, do I still need -D_REENTRANT? On a side note, is there any difference that you know off between the usage of REENTRANT between gcc 3.3.3 and gcc 4.x.x ? When I use -pthread gcc option I can

    Do I need -D_REENTRANT with -pthreads?
    mooz
    mooz 2011/12/08
    pthread を使ったプログラムでコンパイルオプションに -D_REENTRANT は必要か? と言う問い.-pthread オプションを使おう.
  • Lseek implementation

    Hi everybody, i've been googling for ages now and gotten kinda desperate... The question, however, might be rather trivial for the experts: What is it exactly, i.e. physically, the POSIX function (for a file) "lseek" does? Does it trigger some kind of synchronization on disk? Is it just for the file system? Rationale: I'm am running some benchmarks to get an idea, how our system (ext4@Debian5) wor

    Lseek implementation
    mooz
    mooz 2011/11/07
    Linux の ext4 における lseek の実装.generic_file_llseek を呼ぶが,この中ではファイルのオフセットを単に変更するだけ.
  • Man page of SYSCONF

    Section: Linux Programmer's Manual (3) Updated: 2019-05-09 Index JM Home Page roff page 名前 sysconf - 動作中に設定情報を取得する 書式 #include <unistd.h> long sysconf(int name); 説明 POSIX では、アプリケーションがコンパイル時や実行時に、 特定のオプションがサポートされているかや、 設定可能な特定の定数や制限 (limits) がどんな値かをテストすることができる。 コンパイル時に行うには、 <unistd.h> と <limits.h> の両方もしくは一方をインクルードし、 特定のマクロの値を確認する。 実行時には、ここで説明する関数 sysconf() を使って数値を問い合わせることができる。 ファイルが存在するファイルシステムに依存す

    mooz
    mooz 2011/04/03
    様々な設定情報の取得
  • Posix共有メモリ - s-kita’s blog

    Posix.1では、無関係なプロセス間でのメモリ共有を行う方法を2種類提供している。 1.メモリマップファイル(memory-mapped files): ファイルをopenし、結果のファイルディスクリプタをmmapでプロセスのアドレス空間にマップする 共有メモリオブジェクト(shared memory objects): shm_openでIPC名をオープンし、返されたディスクリプタをmmapでプロセスのアドレス空間にマップする shm_open関数、shm_unlink関数Posix共有メモリの使用には、2ステップの処理が必要。 1.名前引数を与えてshm_openを呼び出す 2.mmapを呼び出し、共有メモリを呼び出したプロセスのアドレス空間にマップする shm_openで用いた名前引数は、このメモリを他のプロセスから共有する場合に用いる名前になる。 #include <sys/mm

    Posix共有メモリ - s-kita’s blog
    mooz
    mooz 2011/04/03
    Posix の提供する二つのプロセス間メモリ共有方法.mmap, shm_open.
  • 1
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy