10 More Discussions You Might Find Interesting
1. 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
2. Programming
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies
3. 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
4. UNIX for Dummies Questions & Answers
what is struct winsize used for?
i tried looking it up, but no luck. (0 Replies)
Discussion started by: l flipboi l
0 Replies
5. 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
6. UNIX for Dummies Questions & Answers
Can someone tell me how to do this?
Just a thought that entered my mind when learning about structs.
First thought was:
struct one
{
struct two;
}
struct two
{
three;
}
one->two->three
would this be how you would access "three"? (1 Reply)
Discussion started by: unbelievable21
1 Replies
7. 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
8. Programming
in my .c file i have a struct atop of the program defined as follows:
#define MAX 10
int curtab;
static struct tab {
int count;
int use;
} tab;
with the initial function following it like so:
int tab_create(int init_count)
{
int i;
for(i=0; i < MAX; i++)
{... (1 Reply)
Discussion started by: micmac700
1 Replies
9. Programming
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... (1 Reply)
Discussion started by: jacques83
1 Replies
10. Programming
Hi
We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams.
Following is a code sample:
#include <stdlib.h>
#include <stdio.h>
typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies
IBV_CREATE_SRQ(3) Libibverbs Programmer's Manual IBV_CREATE_SRQ(3)
NAME
ibv_create_srq, ibv_destroy_srq - create or destroy a shared receive queue (SRQ)
SYNOPSIS
#include <infiniband/verbs.h>
struct ibv_srq *ibv_create_srq(struct ibv_pd *pd, struct
ibv_srq_init_attr *srq_init_attr);
int ibv_destroy_srq(struct ibv_srq *srq);
DESCRIPTION
ibv_create_srq() creates a shared receive queue (SRQ) associated with the protection domain pd. The argument srq_init_attr is an
ibv_srq_init_attr struct, as defined in <infiniband/verbs.h>.
struct ibv_srq_init_attr {
void *srq_context; /* Associated context of the SRQ */
struct ibv_srq_attr attr; /* SRQ attributes */
};
struct ibv_srq_attr {
uint32_t max_wr; /* Requested max number of outstanding work requests (WRs) in the SRQ */
uint32_t max_sge; /* Requested max number of scatter elements per WR */
uint32_t srq_limit; /* The limit value of the SRQ (irrelevant for ibv_create_srq) */
};
The function ibv_create_srq() will update the srq_init_attr struct with the original values of the SRQ that was created; the values of
max_wr and max_sge will be greater than or equal to the values requested.
ibv_destroy_srq() destroys the SRQ srq.
RETURN VALUE
ibv_create_srq() returns a pointer to the created SRQ, or NULL if the request fails.
ibv_destroy_srq() returns 0 on success, or the value of errno on failure (which indicates the failure reason).
NOTES
ibv_destroy_srq() fails if any queue pair is still associated with this SRQ.
SEE ALSO
ibv_alloc_pd(3), ibv_modify_srq(3), ibv_query_srq(3)
AUTHORS
Dotan Barak <dotanba@gmail.com>
libibverbs 2006-10-31 IBV_CREATE_SRQ(3)