Sponsored Content
Top Forums Programming Problem with aio_write() function Post 22438 by hmurali on Tuesday 4th of June 2002 12:43:28 AM
Old 06-04-2002
Data Problem with aio_write() function

Hello,

How to execute a call back function after aio_write() or aio_read() in Sun Solaris 5.7?

I have filled the control block struct aiocb as follows:
aio_sigevent.sigev_signo = SIGEV
aio_sigevent.sigev_notify = SIGEV_THREAD

Then I have filled the call back function in
aio_sigevent.sigev_notify_function and the argument in sigev_value.

But, this does not execute the call back function though the asynchronous write is completed in the file.

Can someone explain why this is happening & how to correct it ?

Regards,
Murali
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL function problem

I have perl script as follow. ------------------------------------------------------------------------ #! /usr/bin/env perl use strict; sub printLines { print "Inside the function.............\n"; my (@file , $count , $key ) = $_; print $count , $ key ; #... (2 Replies)
Discussion started by: avadhani
2 Replies

2. Shell Programming and Scripting

Problem with Recursive function

Hi all, I have to move all the files in a tree directory structure to a single directory. Inorder to know which file is from which directory , i'll have to add the name of the directory to the file name. For this i wrote a recursive function which is as follows... (4 Replies)
Discussion started by: malle
4 Replies

3. Shell Programming and Scripting

Function Problem and CoreDump

Hi, i have a question: i build this function: function WriteLog { .... ... print $* print $* >> FileLog .... .... } the function are called with this sintax: ..... ..... (8 Replies)
Discussion started by: ZINGARO
8 Replies

4. Shell Programming and Scripting

Problem with function script.

Need an extra set of eyes. Can't find function. Can someone help, please. Thanks echo " Is this the correct list of tapes to eject (y/n)?" read option echo $option case $option in y|Y) TAPE_ROUTINE;; ... (3 Replies)
Discussion started by: gzs553
3 Replies

5. Shell Programming and Scripting

problem, with if condition in function

Hi All, I have a function which reads parameter and gets the value from config file. The entry in the file can be either of two Name=value or Name=value so if the variant is not present it should return me the generic value ie Name without variant. I am first searching for variant in... (4 Replies)
Discussion started by: gurukottur
4 Replies

6. Shell Programming and Scripting

mail function problem

Hello all, I'm attempting to sent an e-mail with the following funtion in my script. The tested that the logic is correct with another native os command, but I can't seem to get mail to work. I played with the "", just can't seem to get it right. Any ideas? Thanks. $my_mail = `mail... (4 Replies)
Discussion started by: jwholey
4 Replies

7. Shell Programming and Scripting

Calling Function Problem

Hi, I had a scripts which calls two function. One function will call another function, script is working fine but the second function is not calling the first function. Below is the script #!/usr/bin/ksh fun1() { echo $DATETIME >> Test1.ksh return 0 } fun2() { typeset DATETIME=`date... (5 Replies)
Discussion started by: somu_june
5 Replies

8. Shell Programming and Scripting

Problem using function in awk

I created two functions that output two random variables. I want to output them in the output file. But it does not seem to work. # Function rgaussian1(r1, r2) # Gaussian random number generator function rgaussian1(r1, r2) { pi = 3.142 v1 = sqrt( -2 * log(rand()) ) v2... (18 Replies)
Discussion started by: kristinu
18 Replies

9. Shell Programming and Scripting

Function problem

hey guys, im trying to learn bourne shell atm and I'm having some issues with functions. so heres my code: #!/bin/bash ##functions memory () { free -m } space () { df -h } ip () { (5 Replies)
Discussion started by: hawkfro12
5 Replies

10. Shell Programming and Scripting

Bash function problem

I am trying to figure out why I am having a "problem" with some functions in a bash script I am running. The reason for air quoting is that the functions are working, they are just not displaying anything to screen when called from another function. Here's an example: function Create_Input {... (6 Replies)
Discussion started by: dagamier
6 Replies
SIGEVENT(7)						     Linux Programmer's Manual						       SIGEVENT(7)

NAME
sigevent - structure for notification from asynchronous routines SYNOPSIS
#include <signal.h> union sigval { /* Data passed with notification */ int sival_int; /* Integer value */ void *sival_ptr; /* Pointer value */ }; struct sigevent { int sigev_notify; /* Notification method */ int sigev_signo; /* Notification signal */ union sigval sigev_value; /* Data passed with notification */ void (*sigev_notify_function) (union sigval); /* Function used for thread notification (SIGEV_THREAD) */ void *sigev_notify_attributes; /* Attributes for notification thread (SIGEV_THREAD) */ pid_t sigev_notify_thread_id; /* ID of thread to signal (SIGEV_THREAD_ID) */ }; DESCRIPTION
The sigevent structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asyn- chronous request, expiration of a timer, or the arrival of a message). The definition shown in the SYNOPSIS is approximate: some of the fields in the sigevent structure may be defined as part of a union. Pro- grams should employ only those fields relevant to the value specified in sigev_notify. The sigev_notify field specifies how notification is to be performed. This field can have one of the following values: SIGEV_NONE A "null" notification: don't do anything when the event occurs. SIGEV_SIGNAL Notify the process by sending the signal specified in sigev_signo. If the signal is caught with a signal handler that was registered using the sigaction(2) SA_SIGINFO flag, then the following fields are set in the siginfo_t structure that is passed as the second argument of the handler: si_code This field is set to a value that depends on the API delivering the notification. si_signo This field is set to the signal number (i.e., the same value as in sigev_signo). si_value This field is set to the value specified in sigev_value. Depending on the API, other fields may also be set in the siginfo_t structure. The same information is also available if the signal is accepted using sigwaitinfo(2). SIGEV_THREAD Notify the process by invoking sigev_notify_function "as if" it were the start function of a new thread. (Among the implementation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is cre- ated to receive all notifications.) The function is invoked with sigev_value as its sole argument. If sigev_notify_attributes is not NULL, it should point to a pthread_attr_t structure that defines attributes for the new thread (see pthread_attr_init(3)). SIGEV_THREAD_ID (Linux-specific) Currently used only by POSIX timers; see timer_create(2). SEE ALSO
timer_create(2), aio_fsync(3), aio_read(3), aio_write(3), getaddrinfo_a(3), lio_listio(3), mq_notify(3), aio(7), pthreads(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2017-07-13 SIGEVENT(7)
All times are GMT -4. The time now is 08:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy