Rename fd_reference to more suggestive fd_incref.
(Fd_reference sounds like it might just return the ref count.)
This commit is contained in:
parent
856e1fc1ad
commit
51716a869c
2
defs.h
2
defs.h
|
@ -84,7 +84,7 @@ struct fd * fd_alloc();
|
||||||
void fd_close(struct fd *);
|
void fd_close(struct fd *);
|
||||||
int fd_read(struct fd *fd, char *addr, int n);
|
int fd_read(struct fd *fd, char *addr, int n);
|
||||||
int fd_write(struct fd *fd, char *addr, int n);
|
int fd_write(struct fd *fd, char *addr, int n);
|
||||||
void fd_reference(struct fd *fd);
|
void fd_incref(struct fd *fd);
|
||||||
|
|
||||||
// ide.c
|
// ide.c
|
||||||
void ide_init(void);
|
void ide_init(void);
|
||||||
|
|
2
fd.c
2
fd.c
|
@ -99,7 +99,7 @@ fd_close(struct fd *fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fd_reference(struct fd *fd)
|
fd_incref(struct fd *fd)
|
||||||
{
|
{
|
||||||
acquire(&fd_table_lock);
|
acquire(&fd_table_lock);
|
||||||
if(fd->count < 1 || fd->type == FD_CLOSED)
|
if(fd->count < 1 || fd->type == FD_CLOSED)
|
||||||
|
|
Loading…
Reference in a new issue