reindent-20030715
[openafs.git] / src / afs / LINUX / osi_prototypes.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Exported linux support routines.
12  */
13 #ifndef _OSI_PROTO_H_
14 #define _OSI_PROTO_H_
15
16 /* osi_alloc.c */
17 extern void *osi_linux_alloc(unsigned int size, int drop_glock);
18 extern void osi_linux_free(void *addr);
19 extern void osi_linux_free_afs_memory(void);
20 /* Debugging aid */
21 extern void osi_linux_verify_alloced_memory(void);
22
23 /* osi_cred.c */
24 extern cred_t *crget(void);
25 extern void crfree(cred_t * cr);
26 extern cred_t *crdup(cred_t * cr);
27 extern cred_t *crref(void);
28 extern void crset(cred_t * cr);
29
30 /* osi_file.c */
31 extern afs_rwlock_t afs_xosi;
32
33 /* osi_misc.c */
34 extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
35                           vnode_t ** dirvpp, struct dentry **dpp);
36 extern int osi_InitCacheInfo(char *aname);
37 extern int osi_rdwr(int rw, struct osi_file *file, caddr_t addrp,
38                     size_t asize, size_t * resid);
39 extern void inline setup_uio(uio_t * uiop, struct iovec *iovecp, char *buf,
40                              afs_offs_t pos, int count, uio_flag_t flag,
41                              uio_seg_t seg);
42 extern int osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw);
43 extern void afs_osi_SetTime(osi_timeval_t * tvp);
44 extern void osi_linux_free_inode_pages(void);
45 extern void check_bad_parent(struct dentry *dp);
46
47 /* osi_vm.c */
48 extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
49 extern void osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred,
50                               int sync);
51 extern void osi_VM_FSyncInval(struct vcache *avc);
52 extern void osi_VM_StoreAllSegments(struct vcache *avc);
53 extern void osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp);
54 extern void osi_VM_Truncate(struct vcache *avc, int alen,
55                             struct AFS_UCRED *acred);
56
57 /* osi_vfsops.c */
58 extern void set_inode_cache(struct inode *ip, struct vattr *vp);
59
60
61 #endif /* _OSI_PROTO_H_ */