9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there.
It's easier to explain this with a pseudo code, I hope this makes sense:
var1=hello
echo $var1
some kind of loop
echo loop counter
done
How do I hold the cursor position immediately behind the last output so I'd get something like:
hello123456789
DOS used to use ","... (5 Replies)
Discussion started by: MuntyScrunt
5 Replies
2. UNIX for Advanced & Expert Users
Hello All,
The system concerned has multiple processes communicating with each other using shared memory. These processes use semaphores to protect data being used amongst them. The "key" would uniquely identifies the particular semaphore corresponding to a resource for the various processes.
... (2 Replies)
Discussion started by: saptarshi
2 Replies
3. AIX
Hi all,
Have this performance Issue,
srvbd1]root]/]>ps vg | head -1 ; ps vg | grep -w wait
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
8196 - A 4448:23 0 384 384 xx 0 0 12.8 0.0 wait
53274 - A 4179:28 0 384 ... (9 Replies)
Discussion started by: gopeezere
9 Replies
4. Programming
hi All
i have one doubt. in my project am using thrd1 and thrd2. am using interface is mbox and now my doubt is thrd1 is posting data and thrd2 is reading data...?? how we will receive the data... (2 Replies)
Discussion started by: 2104692
2 Replies
5. Shell Programming and Scripting
Hi,
could someone help on this..
I have a date in variable
procdate="05/30/2009"
I would want to Subtract it with 3 or 4 (2 Replies)
Discussion started by: infernalhell
2 Replies
6. Shell Programming and Scripting
I seem to remember seeing a way to hold an expect script or make expect wait for a specific key stroke before continuing.
I ask because I want to automate logging into a device using a key fob. Cant find it in my notes and been through my orielly book twice .. going for a third. (0 Replies)
Discussion started by: popeye
0 Replies
7. Shell Programming and Scripting
Ex: Script 1 has pID=333. I want to take pID to Script 2 so I can retrive 333.
How can I do this? (3 Replies)
Discussion started by: Yakuzan
3 Replies
8. Linux
Hi all.
I have a problem with some printers that when I print a lot of jobs at once the printers gets stuck after 2 prints... (It's a barcode printers - DATAMAX).
Whenever I'm printing each job separtly with a delay of a few seconds the printers work fine...
So my question is how can I... (0 Replies)
Discussion started by: eliraza6
0 Replies
9. Shell Programming and Scripting
dear there,
this kept me awake last night, the variable ${TO} in the following script doesn't seem to hold its value.
I have a file ./filelist, which lists all files of interests. I group them by keywords in the filename, and would like to count total number of lines in each group. ... (7 Replies)
Discussion started by: patiobarbecue
7 Replies
schedctl_init(3C) Standard C Library Functions schedctl_init(3C)
NAME
schedctl_init, schedctl_lookup, schedctl_exit, schedctl_start, schedctl_stop - preemption control
SYNOPSIS
cc [ flag... ] file... [ library... ]
#include <schedctl.h>
schedctl_t *schedctl_init(void);
schedctl_t *schedctl_lookup(void);
void schedctl_exit(void);
void schedctl_start(schedctl_t *ptr);
void schedctl_stop(schedctl_t *ptr);
DESCRIPTION
These functions provide limited control over the scheduling of a thread (see threads(5)). They allow a running thread to give a hint to the
kernel that preemptions of that thread should be avoided. The most likely use for these functions is to block preemption while holding a
spinlock. Improper use of this facility, including attempts to block preemption for sustained periods of time, may result in reduced per-
formance.
The schedctl_init() function initializes preemption control for the calling thread and returns a pointer used to refer to the data. If
schedctl_init() is called more than once by the same thread, the most recently returned pointer is the only valid one.
The schedctl_lookup() function returns the currently allocated preemption control data associated with the calling thread that was previ-
ously returned by schedctl_init(). This can be useful in programs where it is difficult to maintain local state for each thread.
The schedctl_exit() function removes the preemption control data associated with the calling thread.
The schedctl_start() macro gives a hint to the kernel scheduler that preemption should be avoided on the current thread. The pointer passed
to the macro must be the same as the pointer returned by the call to schedctl_init() by the current thread. The behavior of the program
when other values are passed is undefined.
The schedctl_stop() macro removes the hint that was set by schedctl_start(). As with schedctl_start(), the pointer passed to the macro must
be the same as the pointer returned by the call to schedctl_init() by the current thread.
The schedctl_start() and schedctl_stop() macros are intended to be used to bracket short critical sections, such as the time spent holding
a spinlock. Other uses, including the failure to call schedctl_stop() soon after calling schedctl_start(), might result in poor perfor-
mance.
RETURN VALUES
The schedctl_init() function returns a pointer to a schedctl_t structure if the initialization was successful, or NULL otherwise. The
schedctl_lookup() function returns a pointer to a schedctl_t structure if the data for that thread was found, or NULL otherwise.
ERRORS
No errors are returned.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
priocntl(1), exec(2), fork(2), priocntl(2), attributes(5), threads(5)
NOTES
Preemption control is intended for use by threads belonging to the time-sharing (TS), interactive (IA), fair-share (FSS), and fixed-prior-
ity (FX) scheduling classes. If used by threads in other scheduling classes, such as real-time (RT), no errors will be returned but sched-
ctl_start() and schedctl_stop() will not have any effect.
The data used for preemption control are not copied in the child of a fork(2). Thus, if a process containing threads using preemption con-
trol calls fork and the child does not immediately call exec(2), each thread in the child must call schedctl_init() again prior to any
future uses of schedctl_start() and schedctl_stop(). Failure to do so will result in undefined behavior.
SunOS 5.11 28 May 2003 schedctl_init(3C)