Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
b3a255a6
Commit
b3a255a6
authored
21 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
Rearrange request struct so data is condvar protected. Pass data via condvar call.
parent
61e07188
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapThreads/zmapConn_P.h
+9
-11
9 additions, 11 deletions
src/zmapThreads/zmapConn_P.h
with
9 additions
and
11 deletions
src/zmapThreads/zmapConn_P.h
+
9
−
11
View file @
b3a255a6
...
...
@@ -26,9 +26,9 @@
* Description:
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Mar
1 1
4:24
2004 (edgrif)
* Last edited: Mar
1
1 1
5:43
2004 (edgrif)
* Created: Thu Jul 24 14:36:08 2003 (edgrif)
* CVS info: $Id: zmapConn_P.h,v 1.
3
2004-03-
03
1
2
:0
5:45
edgrif Exp $
* CVS info: $Id: zmapConn_P.h,v 1.
4
2004-03-
12
1
6
:0
0:38
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CONN_PRIV_H
...
...
@@ -62,6 +62,7 @@ typedef struct
pthread_mutex_t
mutex
;
/* controls access to this struct. */
pthread_cond_t
cond
;
/* Slave waits on this. */
ZMapThreadRequest
state
;
/* Contains request to slave. */
gchar
*
data
;
/* Contains data for request. */
}
ZMapRequestStruct
,
*
ZMapRequest
;
/* Replies via a simpler mutex. */
...
...
@@ -69,8 +70,8 @@ typedef struct
{
pthread_mutex_t
mutex
;
/* controls access to this struct. */
ZMapThreadReply
state
;
/* Contains reply from slave. */
char
*
data
;
/* May also contain data for some replies. */
char
*
error_msg
;
/* May contain error message for when
g
char
*
data
;
/* May also contain data for some replies. */
g
char
*
error_msg
;
/* May contain error message for when
thread fails. */
}
ZMapReplyStruct
,
*
ZMapReply
;
...
...
@@ -84,12 +85,12 @@ typedef struct _ZMapConnectionStruct
gchar
*
machine
;
int
port
;
gchar
*
protocol
;
gchar
*
sequence
;
pthread_t
thread_id
;
/* These control the communication between the GUI thread and the connection threads,
* they are mutex locked and the request code makes use of the condition variable. */
* they are mutex locked and the request code makes use of the condition variable to
* communicate with slave threads. */
ZMapRequestStruct
request
;
/* GUIs request. */
ZMapReplyStruct
reply
;
/* Slaves reply. */
...
...
@@ -102,15 +103,12 @@ void *zmapNewThread(void *thread_args) ;
/* Request routines. */
void
zmapCondVarCreate
(
ZMapRequest
thread_state
)
;
void
zmapCondVarSignal
(
ZMapRequest
thread_state
,
ZMapThreadRequest
new_state
)
;
void
zmapCondVarSignal
(
ZMapRequest
thread_state
,
ZMapThreadRequest
new_state
,
gchar
*
data
)
;
void
zmapCondVarWait
(
ZMapRequest
thread_state
,
ZMapThreadRequest
waiting_state
)
;
ZMapThreadRequest
zmapCondVarWaitTimed
(
ZMapRequest
condvar
,
ZMapThreadRequest
waiting_state
,
TIMESPEC
*
timeout
,
gboolean
reset_to_waiting
)
;
TIMESPEC
*
timeout
,
gboolean
reset_to_waiting
,
gchar
**
data
)
;
void
zmapCondVarDestroy
(
ZMapRequest
thread_state
)
;
char
*
zmapVarGetRequestString
(
ZMapThreadRequest
signalled_state
)
;
/* Reply routines. */
void
zmapVarCreate
(
ZMapReply
thread_state
)
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment