11-28-2006
Problem accessing struct member
I have a struct as follows...
struct A
{
int a;
ucontext_t X; //ucontext_t is another structure
}
How do I define a pointer to the above structure variable X of the type ucontext_t from within another function?
eg. void foo()
{
struct A a;
/////WHAT COMES IN HERE?///////////////
}
10 More Discussions You Might Find Interesting
1. Programming
I receive an integer as argument for a function.
within function definition i want it to be of type struct tm.
eg..
main()
{
int a;
......
}
function(...,..,a,..)
int a;
{
struct tm tm;
if(!a)
^ time(&a);
^ ... (4 Replies)
Discussion started by: bankpro
4 Replies
2. Shell Programming and Scripting
Hi All,
Just recently started using a program in Unix for a client. I was sent a script to use but for some reason it's not working. The person who created the script first suggested I may need to edit the first line of the script so that it has the correct path for the csh file: #!/bin/csh -f... (3 Replies)
Discussion started by: gmalt
3 Replies
3. Solaris
Hi, I'm having a problem when attempting to define the OCR location for my 10g RAC setup on Solaris 10. I get the following error:
The specified shared raw partition /dev/did/rdsk/d1s0 may not have the correct permission. Verify that the partition is owned by Oracle user.
As per the Oracle10g... (15 Replies)
Discussion started by: michael.chow
15 Replies
4. Solaris
Basically I´m Absolutely New to Opensolaris (Started Using It This Morning),
I´m Following A Tutorial On How To Access NTFS Partitions.
Device Driver Utility Finds It And Says Everythings Fine With It
DISK : ST3160022ACE
Capacity : 160G
Driver ... (7 Replies)
Discussion started by: xXCanisLupusXx
7 Replies
5. UNIX for Advanced & Expert Users
iam trying to built a firewall.so i have used netfilter for it.
in function main_hook sock_buff is returning null and in my log file continuously "sock buff null" is printed plse help to solve this problem..
(using print_string iam printing strings on current terminal (terminal we ping))
... (1 Reply)
Discussion started by: pavan6754
1 Replies
6. Programming
Hi,
I found on linuxgazette.net/93/bhaskaran.html page very useful sample of virtual driver (not connected to real hardware).
I try to compile it with no effect.
So:
I got fresh Ubuntu 9.10 (kernel 2.6.31-14)
My source is saved in networkAdapter.c file in /usr/src/myModules directory.
I... (21 Replies)
Discussion started by: Chrisdot
21 Replies
7. IP Networking
I hope I'm posting this in the right forum...
Hi, I'm a newbie trying to set up my own home web server. I have an old laptop where I have a LAMP set up.
Virgin Media won't give me a static IP so I am using dyndns, my IP hasn't changed for months anyway...
So the problem is this...
The... (5 Replies)
Discussion started by: Percyval
5 Replies
8. Programming
I have the following code and getting the compilation errors
baseLib/DynBaseObj.h:80: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:89: error: expected constructor, destructor, or type conversion before ‘(' token
baseLib/DynBaseObj.h:101:... (0 Replies)
Discussion started by: kristinu
0 Replies
9. Programming
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 Replies)
Discussion started by: Powerponken
2 Replies
10. Programming
I have a uint8_t *C = malloc(24*sizeof(uint8_t));
I need to send some integers and this *C to another node(in ad hoc network). So I am going to use a struct
` struct fulMsg {
int msgType;
int msgCount;
//uint8_t *CC;
} fulMsg_t;
typedef struct fulMsg fulMsg_tt;`
there is a method... (1 Reply)
Discussion started by: chap
1 Replies
LEARN ABOUT SUNOS
ucontext
ucontext.h(3HEAD) Headers ucontext.h(3HEAD)
NAME
ucontext.h, ucontext - user context
SYNOPSIS
#include <ucontext.h>
DESCRIPTION
The <ucontext.h> header defines the ucontext_t type as a structure that includes at least the following members:
ucontext_t uc_link
sigset_t uc_sigmask
stack_t uc_stack
mcontext_t uc_mcontext
The uc_link member is a pointer to the context that to be resumed when this context returns. If uc_link is equal to 0, this context is the
main context and the process exits when this context returns.
The uc_sigmask member defines the set of signals that are blocked when this context is active. See sigprocmask(2).
The uc_stack member defines the stack used by this context. See sigaltstack(2).
The uc_mcontext member contains the saved set of machine registers and any implementation-specific context data. Portable applications
should not modify or access uc_mcontext.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
getcontext(2), sigaction(2), sigaltstack(2), sigprocmask(2), makecontext(3C), attributes(5), standards(5)
SunOS 5.10 30 Aug 2002 ucontext.h(3HEAD)