04-01-2008
stackbase2 is not getting used in program so i didn't bother about it. Passing pointer argument in test_main () function also i have tried with giving proper values like base as stack address and size as stack size. Same code works fine if i compile all in one file. Problem comes only if i move library code to another file and compile it to generate shared object (.so library). And when i link this to compile and run with main() then i get segmentation fault.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HELP!!!! I am in an on-line shell programming class and have a question. Here is the data:
Mike Harrington:(510) 548-1278:250:100:175
Christian Dobbins:(408) 538-2358:155:90:201
Susan Dalsass:(206) 654-6279:250:60:50
(There are 12 contribuors total)
This database contains names, phone... (1 Reply)
Discussion started by: NewbieGirl
1 Replies
2. AIX
Hi,
I am just running a incremental back-up on one of my server.
But these days It abrubtly fails with below error.
==========
User defined signal 1
===========
When I rerun the back-up, It completed successfully.Earlier this was not happening.
Any Idea, what could be the problem... (0 Replies)
Discussion started by: nitesh_raj
0 Replies
3. UNIX for Dummies Questions & Answers
I want to add a new IP service which executes a script on SCO OS5.
I have amended /etc/services and added to port number (3333)
I have amended /etc/inetd.conf and added a line for this service but I can't get it to execute my own shell script
When I telnet to the IP address on port 3333 I... (1 Reply)
Discussion started by: markdrury
1 Replies
4. Shell Programming and Scripting
Dear Friends,
I need a help regarding User defined function in shell script.
My problem is as follows:
my_func.sh
my_funcI(){
grep 'mystring' I.dat
}
my_funcQ(){
grep 'mystring' Q.dat
}
myfuncI
myfuncQ
But As both the function has same function only the... (11 Replies)
Discussion started by: user_prady
11 Replies
5. Linux
Hi,
I am currently working with threads using linux 2.6.11 and glibc 2.3.5 on x86. When i am trying to create thread with user defined stacks glibc gives segmentation fault. I have written a wrapper to pthread_create () and generated shared object for the same. When i am trying to create any... (0 Replies)
Discussion started by: mysterious
0 Replies
6. Programming
Hi
Is there a way to add more user-defined signals?
I am currently using SIGUSR1 and SIGUSR2 - but I need another one.
How can I do that?
Thanks! (9 Replies)
Discussion started by: naamabm
9 Replies
7. Shell Programming and Scripting
Hi;
Is der ne to to use user defined functions for the values in awk
find $1 -type f -ls | nawk '{{print "|"$3"|"$5"|"$6"|"$8"|"$9"|"$10"|"} for(i=11;i<=NF;i++){printf("%s",$i)}}'
In above command i want to append some values returned by user functions on line.
thnks;
ajay (1 Reply)
Discussion started by: ajaypadvi
1 Replies
8. UNIX for Dummies Questions & Answers
Hi, i would like to create user defined commands.
e,g:
if an user executes ,
mkdircd test then a directory called test should be created and it should be cd to test.
How i can create the command mkdircd with below action:
mkdir $1 && cd $1.
Please help me in achieving this (7 Replies)
Discussion started by: pandeesh
7 Replies
9. UNIX and Linux Applications
I have to debug a function getopt_long in glibc-2.11.3-17.31.1.
For that how can I download and install its corresponding glibc-debug on SLES 11? (8 Replies)
Discussion started by: rupeshkp728
8 Replies
LEARN ABOUT OSF1
pthread_attr_getstackaddr_np
pthread_attr_getstackaddr(3) Library Functions Manual pthread_attr_getstackaddr(3)
NAME
pthread_attr_getstackaddr - Obtains the stack address attribute of the specified thread attributes object.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
int pthread_attr_getstackaddr_np(
const pthread_attr_t *attr,
void **stackaddr,
size_t *size);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
PARAMETERS
Address of the thread attributes object whose stack address attribute is obtained. Receives the address of the stack region of the thread
attributes object specified by attr. The size of the stack region in bytes.
DESCRIPTION
This routine obtains the value of the stack address attribute of the thread attributes object specified in the attr argument and stores it
in the location specified by the stackaddr argument. The specified attributes object must already be initialized at the time this routine
is called.
The stack address attribute of a thread attributes object points to the origin of the stack for a new thread.
Unlike pthread_attr_getstackaddr(3), this routine is a much more reliable portable interface. With the POSIX standard pthread_attr_get-
stackaddr(3), a stack is specified using a single, undefined, address. An implementation of the standard can only assume that the speci-
fied value represents the value to which the thread's stack pointer should be set when beginning execution. However, this requires the
application to know how the machine uses the stack. For example, a stack may grow either up (to higher addresses) or down (to lower
addresses), and may be decreased (or increased) either before or after storing a new value.
DECthreads provides an alternative interface with pthread_attr_getstackaddr_np(3). Instead of returning a stack address, it returns the
base (lowest) address and the size.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The value specified by attr is not a valid thread attributes object.
ERRORS
None
RELATED INFORMATION
Functions: pthread_attr_setstackaddr_np(3)
Manuals: Guide to DECthreads and Programmer's Guide delim off
pthread_attr_getstackaddr(3)