Rev 2681 | Rev 2683 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2681 | Rev 2682 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2007 Jakub Jermar |
2 | * Copyright (c) 2008 Jakub Jermar |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
Line 134... | Line 134... | ||
134 | typedef struct { |
134 | typedef struct { |
135 | VFS_TRIPLET; /**< Identity of the node. */ |
135 | VFS_TRIPLET; /**< Identity of the node. */ |
136 | unsigned refcnt; /**< Usage counter. */ |
136 | unsigned refcnt; /**< Usage counter. */ |
137 | link_t nh_link; /**< Node hash-table link. */ |
137 | link_t nh_link; /**< Node hash-table link. */ |
138 | 138 | ||
- | 139 | /** |
|
139 | /** Holding this rwlock prevents modifications of the node's contents. */ |
140 | * Holding this rwlock prevents modifications of the node's contents. |
- | 141 | */ |
|
140 | atomic_t contents_rwlock; |
142 | rwlock_t contents_rwlock; |
141 | } vfs_node_t; |
143 | } vfs_node_t; |
142 | 144 | ||
143 | /** |
145 | /** |
144 | * Instances of this type represent an open file. If the file is opened by more |
146 | * Instances of this type represent an open file. If the file is opened by more |
145 | * than one task, there will be a separate structure allocated for each task. |
147 | * than one task, there will be a separate structure allocated for each task. |