8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
Please I try to apply the mechanism Interposition Function in Linux on the function write (write a socket) as follows:
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <stdio.h>
# include <string.h>... (2 Replies)
Discussion started by: chercheur857
2 Replies
3. UNIX for Dummies Questions & Answers
hi;
i have file with a lote of data
i would like to cut only numbers that start with prefix 20408
my file contain thousands of rows like this
,204080700152648,20111215,,,20
31630536259,204080662332510,20
31622520779,204080660098298,20
31651343790,204080130071280,20... (2 Replies)
Discussion started by: kpinto
2 Replies
4. UNIX for Advanced & Expert Users
I want address of current virtual memory block?
i am using fedora10:wall::wall: (1 Reply)
Discussion started by: powyama
1 Replies
5. Shell Programming and Scripting
I want to know about the difference between system() function nd backtrick term in linux???? (1 Reply)
Discussion started by: Mac91
1 Replies
6. Shell Programming and Scripting
Hi folks,
I'm a CS students enrolled in a sysadmin class where we've been covering bash scripting for the past few weeks. I have prior knowledge in java, c++, c#, python,and some scripting languages like asp.net w/c# and php. This bash stuff seems pretty neat and a bit different than what I am... (9 Replies)
Discussion started by: KalEl
9 Replies
7. Linux
Hi
1) I need to replace an "enter" character with another character.
I thought it should be like this (E.G)
replace all stirngs "LIAV"+enter with kokokoko:
:1,$s/LIAV^M/kokokoko/g
but it dose not work.
2) Also dose nayone know how to replace wildcards?
for... (3 Replies)
Discussion started by: liav
3 Replies
8. UNIX for Advanced & Expert Users
how can we determine that which scripts ,binaries, utilities or something else uses a specific environment variable?
i have an environment variable EXTRAPATH in a shell script, and i want to determine if it is used by something else or it is absolutely useless. (4 Replies)
Discussion started by: gfhgfnhhn
4 Replies
ddi_intr_add_handler(9F) ddi_intr_add_handler(9F)
NAME
ddi_intr_add_handler, ddi_intr_remove_handler - add or remove interrupt handler
SYNOPSIS
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_intr_add_handler(ddi_intr_handle_t *h, ddi_intr_handler_t inthandler, void *arg1, void *arg2);
int ddi_intr_remove_handler(ddi_intr_handle_t h);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
ddi_intr_add_handler()
h Pointer to the DDI interrupt handle
inthandler Pointer to interrupt handler
arg1 First argument for the interrupt handler
arg2 Second, optional, argument for the interrupt handler
ddi_intr_remove_handler()
h DDI interrupt handle
The ddi_intr_add_handler() function adds an interrupt handler given by the inthandler argument to the system with the handler arguments
arg1 and arg2 for the previously allocated interrupt handle specified by the h pointer. The arguments arg1 and arg2 are passed as the first
and second arguments, respectively, to the interrupt handler inthandler. See <sys/ddi_intr.h> for the definition of the interrupt handler.
The routine inthandler with the arguments arg1 and arg2 is called upon receipt of the appropriate interrupt. The interrupt handler should
return DDI_INTR_CLAIMED if the interrupt is claimed and DDI_INTR_UNCLAIMED otherwise.
The ddi_intr_add_handler() function must be called after ddi_intr_alloc(), but before ddi_intr_enable() is called. The interrupt must be
enabled through ddi_intr_enable() or ddi_intr_block_enable() before it can be used.
The ddi_intr_remove_handler() function removes the handler association, added previously with ddi_intr_add_handler(), for the interrupt
identified by the interrupt handle h argument. Unloadable drivers should call this routine during their detach(9E) routine to remove the
interrupt handler from the system.
The ddi_intr_remove_handler() function is used to disassociate the handler after the interrupt is disabled to remove dup-ed interrupt han-
dles. See ddi_intr_dup_handler(9F) for dup-ed interrupt handles. If a handler is duplicated with the ddi_intr_dup_handler() function, all
added and duplicated instances of the handler must be removed with ddi_intr_remove_handler() in order for the handler to be completely
removed.
The ddi_intr_add_handler() and ddi_intr_remove_handler() functions return:
DDI_SUCCESS On success.
DDI_EINVAL On encountering invalid input parameters.
DDI_FAILURE On any implementation specific failure.
CONTEXT
The ddi_intr_add_handler() and ddi_intr_remove_handler() functions can be called from kernel non-interrupt context.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
attributes(5), attach(9E), detach(9E), ddi_intr_alloc(9F), ddi_intr_block_enable(9F), ddi_intr_disable(9F), ddi_intr_dup_handler(9F),
ddi_intr_enable(9F), ddi_intr_free(9F), ddi_intr_get_supported_types(9F), mutex(9F), mutex_init(9F), rw_init(9F), rwlock(9F)
Consumers of these interfaces should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could
result in inconsistent behavior among platforms.
If a device driver that uses MSI and MSI-X interrupts resets the device, the device might reset its configuration space modifications. Such
a reset could cause a device driver to lose any MSI and MSI-X interrupt usage settings that have been applied.
The second argument, arg2, is optional. Device drivers are free to use the two arguments however they see fit. There is no officially rec-
ommended model or restrictions. For example, an interrupt handler may wish to use the first argument as the pointer to its softstate and
the second argument as the value of the MSI vector.
22 Apr 2005 ddi_intr_add_handler(9F)