linux-conflate-rdwrs-20050419
[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                           struct dentry **dpp);
36 extern int osi_InitCacheInfo(char *aname);
37 extern int osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw);
38 extern void afs_osi_SetTime(osi_timeval_t * tvp);
39 extern void osi_linux_free_inode_pages(void);
40 extern void check_bad_parent(struct dentry *dp);
41
42 /* osi_probe.c */
43 extern void *osi_find_syscall_table(int which);
44
45 /* osi_syscall.c */
46 extern int osi_syscall_init(void);
47 extern void osi_syscall_clean(void);
48
49 /* osi_sysctl.c */
50 extern int osi_sysctl_init(void);
51 extern void osi_sysctl_clean(void);
52
53 /* osi_vm.c */
54 extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
55 extern void osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred,
56                               int sync);
57 extern void osi_VM_FSyncInval(struct vcache *avc);
58 extern void osi_VM_StoreAllSegments(struct vcache *avc);
59 extern void osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp);
60 extern void osi_VM_Truncate(struct vcache *avc, int alen,
61                             struct AFS_UCRED *acred);
62
63 /* osi_vfsops.c */
64 extern void set_inode_cache(struct inode *ip, struct vattr *vp);
65 extern void put_inode_on_dummy_list(struct inode *ip);
66 extern void vattr2inode(struct inode *ip, struct vattr *vp);
67
68 /* osi_vnodeops.c */
69 extern int afs_linux_writepage_sync(struct inode *ip, struct page *pp,
70                                     unsigned long offset, unsigned int count);
71
72 #endif /* _OSI_PROTO_H_ */