1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * Task.xs contains XS wrappers for the task maniplulation functions.
27  */
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /* Solaris includes. */
32 #include <sys/task.h>
33 
34 /* Perl includes. */
35 #include "EXTERN.h"
36 #include "perl.h"
37 #include "XSUB.h"
38 
39 /*
40  * The XS code exported to perl is below here.  Note that the XS preprocessor
41  * has its own commenting syntax, so all comments from this point on are in
42  * that form.
43  */
44 
45 MODULE = Sun::Solaris::Task PACKAGE = Sun::Solaris::Task
46 PROTOTYPES: ENABLE
47 
48  #
49  # Define any constants that need to be exported.  By doing it this way we can
50  # avoid the overhead of using the DynaLoader package, and in addition constants
51  # defined using this mechanism are eligible for inlining by the perl
52  # interpreter at compile time.
53  #
54 BOOT:
55 	{
56 	HV *stash;
57 
58 	stash = gv_stashpv("Sun::Solaris::Task", TRUE);
59 	newCONSTSUB(stash, "TASK_NORMAL", newSViv(TASK_NORMAL));
60 	newCONSTSUB(stash, "TASK_FINAL", newSViv(TASK_FINAL));
61 	}
62 
63 taskid_t
64 settaskid(project, flags)
65 	projid_t	project
66 	int		flags
67 
68 taskid_t
69 gettaskid()
70 
71