LINUX: CURRENT_TIME macro goes away.
[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_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, struct uio *uiop, int rw);
41 extern struct file *afs_linux_raw_open(afs_dcache_id_t *ainode);
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_sleep.c */
65 extern void osi_event_shutdown(void);
66
67 /* osi_syscall.c */
68 extern int osi_syscall_init(void);
69 extern void osi_syscall_clean(void);
70
71 /* osi_sysctl.c */
72 extern int osi_sysctl_init(void);
73 extern void osi_sysctl_clean(void);
74
75 /* osi_vm.c */
76 extern int osi_VM_FlushVCache(struct vcache *avc);
77 extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred,
78                               int sync);
79 extern void osi_VM_FSyncInval(struct vcache *avc);
80 extern void osi_VM_StoreAllSegments(struct vcache *avc);
81 extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp);
82 extern void osi_VM_Truncate(struct vcache *avc, int alen,
83                             afs_ucred_t *acred);
84
85 /* osi_vcache.c */
86 extern void osi_ResetRootVCache(afs_uint32 volid);
87
88 /* osi_vfsops.c */
89 extern void vattr2inode(struct inode *ip, struct vattr *vp);
90 extern int afs_init_inodecache(void);
91 extern void afs_destroy_inodecache(void);
92
93 /* osi_vnodeops.c */
94 extern void afs_fill_inode(struct inode *ip, struct vattr *vattr);
95
96 /* osi_groups.c */
97 extern void osi_keyring_init(void);
98 extern void osi_keyring_shutdown(void);
99 extern int __setpag(cred_t **cr, afs_uint32 pagvalue, afs_uint32 *newpag,
100                     int change_parent, struct group_info **old_groups);
101 #ifdef LINUX_KEYRING_SUPPORT
102 extern afs_int32 osi_get_keyring_pag(afs_ucred_t *);
103 extern struct key_type key_type_afs_pag;
104 #endif /* LINUX_KEYRING_SUPPORT */
105
106
107 #endif /* _OSI_PROTO_H_ */