Rev 2710 | Rev 2735 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2710 | Rev 2734 | ||
---|---|---|---|
Line 133... | Line 133... | ||
133 | return _open(path, L_FILE, oflag); |
133 | return _open(path, L_FILE, oflag); |
134 | } |
134 | } |
135 | 135 | ||
136 | int close(int fildes) |
136 | int close(int fildes) |
137 | { |
137 | { |
- | 138 | int res; |
|
- | 139 | ipcarg_t rc; |
|
- | 140 | ||
- | 141 | futex_down(&vfs_phone_futex); |
|
- | 142 | async_serialize_start(); |
|
- | 143 | if (vfs_phone < 0) { |
|
- | 144 | res = vfs_connect(); |
|
- | 145 | if (res < 0) { |
|
- | 146 | async_serialize_end(); |
|
- | 147 | futex_up(&vfs_phone_futex); |
|
- | 148 | return res; |
|
- | 149 | } |
|
- | 150 | } |
|
- | 151 | ||
- | 152 | rc = async_req_1_0(vfs_phone, VFS_CLOSE, fildes); |
|
- | 153 | ||
- | 154 | async_serialize_end(); |
|
- | 155 | futex_up(&vfs_phone_futex); |
|
- | 156 | ||
138 | return 0; /* TODO */ |
157 | return (int)rc; |
139 | } |
158 | } |
140 | 159 | ||
141 | ssize_t read(int fildes, void *buf, size_t nbyte) |
160 | ssize_t read(int fildes, void *buf, size_t nbyte) |
142 | { |
161 | { |
143 | int res; |
162 | int res; |