c32830581d078608f4631de53b037f9a6b88a449
[openafs.git] / src / afs / LINUX24 / 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_nfssrv.c */
31 extern int osi_linux_nfs_initreq(struct vrequest *av, afs_ucred_t *cr,
32                                  int *code);
33 extern void osi_linux_nfssrv_init(void);
34 extern void osi_linux_nfssrv_shutdown(void);
35 extern afs_rwlock_t afs_xnfssrv;
36
37 /* osi_file.c */
38 extern afs_rwlock_t afs_xosi;
39 extern int osi_InitCacheInfo(char *aname);
40 extern int osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw);
41 extern struct file *afs_linux_raw_open(afs_dcache_id_t *ainode, ino_t *hint);
42
43 /* osi_ioctl.c */
44 extern void osi_ioctl_init(void);
45 extern void osi_ioctl_clean(void);
46
47 /* osi_misc.c */
48 extern void afs_osi_SetTime(osi_timeval_t * tvp);
49 extern int osi_lookupname_internal(char *aname, int followlink,
50                                    struct vfsmount **mnt, struct dentry **dpp);
51 extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
52                           struct dentry **dpp);
53 extern int osi_abspath(char *aname, char *buf, int buflen,
54                        int followlink, char **pathp);
55 extern void afs_start_thread(void (*proc)(void), char *name);
56
57 /* osi_probe.c */
58 extern void *osi_find_syscall_table(int which);
59
60 /* osi_proc.c */
61 extern void osi_proc_init(void);
62 extern void osi_proc_clean(void);
63
64 /* osi_syscall.c */
65 extern int osi_syscall_init(void);
66 extern void osi_syscall_clean(void);
67
68 /* osi_sysctl.c */
69 extern int osi_sysctl_init(void);
70 extern void osi_sysctl_clean(void);
71
72 /* osi_vm.c */
73 extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
74 extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred,
75                               int sync);
76 extern void osi_VM_FSyncInval(struct vcache *avc);
77 extern void osi_VM_StoreAllSegments(struct vcache *avc);
78 extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp);
79 extern void osi_VM_Truncate(struct vcache *avc, int alen,
80                             afs_ucred_t *acred);
81
82 /* osi_vfsops.c */
83 extern void vattr2inode(struct inode *ip, struct vattr *vp);
84 extern int afs_init_inodecache(void);
85 extern void afs_destroy_inodecache(void);
86 extern void osi_linux_free_inode_pages(void);
87
88 /* osi_vnodeops.c */
89 extern void afs_fill_inode(struct inode *ip, struct vattr *vattr);
90
91 /* osi_groups.c */
92 extern void osi_keyring_init(void);
93 extern void osi_keyring_shutdown(void);
94 extern int __setpag(cred_t **cr, afs_uint32 pagvalue, afs_uint32 *newpag,
95                     int change_parent);
96 #ifdef LINUX_KEYRING_SUPPORT
97 extern struct key_type key_type_afs_pag;
98 #endif /* LINUX_KEYRING_SUPPORT */
99
100
101 #endif /* _OSI_PROTO_H_ */