Reading Gauche/Reading Gauche 0.9/gc/misc.c/GC_write の変更点



 #setlinebreak(on)
 #topicpath
 *GC_write(fd, buf, len) [#uae3ff63]
 *概要 [#k0d5a43d]
 bufをファイルfdに最大lenバイト書き込む。
 書き込んだバイト数を戻す。
 
  #if !defined(MSWIN32) && !defined(MSWINCE) && !defined(OS2) \
     && !defined(MACOS)  && !defined(ECOS) && !defined(NOSYS)
  int GC_write(fd, buf, len)
  int fd;
  const char *buf;
  size_t len;
  {
      register int bytes_written = 0;
      register int result;
      IF_CANCEL(int cancel_state;)
  
      DISABLE_CANCEL(cancel_state);
      while (bytes_written < len) {
  #	ifdef GC_SOLARIS_THREADS
 	    result = syscall(SYS_write, fd, buf + bytes_written,
 	    			  	    len - bytes_written);
  #	else
      	    result = write(fd, buf + bytes_written, len - bytes_written);
  #	endif
         if (-1 == result) {
             RESTORE_CANCEL(cancel_state);
             return(result);
         }
 	bytes_written += result;
     }
      RESTORE_CANCEL(cancel_state);
     return(bytes_written);
  }
  #endif /* UN*X */
 
 *調べるもの [#n8b329a4]
 -[[Reading Gauche/Reading Gauche 0.9/gc/include/private/gcconfig.h/IF_CANCEL]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/include/private/gc_priv.h/DISABLE_CANCEL]]
 -[[Reading Gauche/Reading Gaiche 0.9/gc/include/private/gc_priv.h/RESTORE_CANCEL]]
 -[[Reading Gauche/Reading Gauche 0.9/gc/include/private/gc_priv.h/RESTORE_CANCEL]]
 
 *参照元 [#f9bffe68]
 #related
 
 *コメント [#aced92f8]
 #pcomment(,1000,below,reply)

リロード   新規 編集 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.005 sec.