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)
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)
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)
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)
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)
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)
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)
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)
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)
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 FREEBSD
getcontextx
GETCONTEXT(3) BSD Library Functions Manual GETCONTEXT(3)NAME
getcontext, getcontextx, setcontext -- get and set user thread context
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ucontext.h>
int
getcontext(ucontext_t *ucp);
ucontext_t *
getcontextx(void);
int
setcontext(const ucontext_t *ucp);
DESCRIPTION
The getcontext() function saves the current thread's execution context in the structure pointed to by ucp. This saved context may then later
be restored by calling setcontext().
The getcontextx() function saves the current execution context in the newly allocated structure ucontext_t, which is returned on success. If
architecture defines additional CPU states that can be stored in extended blocks referenced from the ucontext_t, the memory for them may be
allocated and their context also stored. Memory returned by getcontextx() function shall be freed using free(3).
The setcontext() function makes a previously saved thread context the current thread context, i.e., the current context is lost and
setcontext() does not return. Instead, execution continues in the context specified by ucp, which must have been previously initialized by a
call to getcontext(), makecontext(3), or by being passed as an argument to a signal handler (see sigaction(2)).
If ucp was initialized by getcontext(), then execution continues as if the original getcontext() call had just returned (again).
If ucp was initialized by makecontext(3), execution continues with the invocation of the function specified to makecontext(3). When that
function returns, ucp->uc_link determines what happens next: if ucp->uc_link is NULL, the process exits; otherwise, setcontext(ucp->uc_link)
is implicitly invoked.
If ucp was initialized by the invocation of a signal handler, execution continues at the point the thread was interrupted by the signal.
RETURN VALUES
If successful, getcontext() returns zero and setcontext() does not return; otherwise -1 is returned. The getcontextx() returns pointer to
the allocated and initialized context on success, and NULL on failure.
ERRORS
No errors are defined for getcontext() or setcontext(). The getcontextx() may return the following errors in errno:
[ENOMEM] No memory was available to allocate for the context or some extended state.
SEE ALSO sigaction(2), sigaltstack(2), makecontext(3), ucontext(3)BSD March 13, 2013 BSD