Rev 2624 | Rev 2731 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2624 | Rev 2683 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | if (!files[i]) { |
84 | if (!files[i]) { |
85 | files[i] = (vfs_file_t *) malloc(sizeof(vfs_file_t)); |
85 | files[i] = (vfs_file_t *) malloc(sizeof(vfs_file_t)); |
86 | if (!files[i]) |
86 | if (!files[i]) |
87 | return ENOMEM; |
87 | return ENOMEM; |
88 | memset(files[i], 0, sizeof(vfs_file_t)); |
88 | memset(files[i], 0, sizeof(vfs_file_t)); |
- | 89 | futex_initialize(&files[i]->lock, 1); |
|
89 | vfs_file_addref(files[i]); |
90 | vfs_file_addref(files[i]); |
90 | return i; |
91 | return i; |
91 | } |
92 | } |
92 | } |
93 | } |
93 | return EMFILE; |
94 | return EMFILE; |