diff options
author | Simon Thum <simon.thum@gmx.de> | 2008-07-23 12:03:17 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2008-07-28 18:13:19 +0930 |
commit | a17cb29f5acdfcdeac929d8c6be3600d44d038ef (patch) | |
tree | 4c8e7f2010695a90a89841cfb54fe1059ea639fe /dix | |
parent | 1a9f9ac50f2b0db735789905cc29572a50c8ae4c (diff) |
dix: preparation change: make runtime exchange of filter chain safe
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/ptrveloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dix/ptrveloc.c b/dix/ptrveloc.c index 32ba3e168..d6cd8c5af 100644 --- a/dix/ptrveloc.c +++ b/dix/ptrveloc.c @@ -30,6 +30,7 @@ #include <ptrveloc.h> #include <inputstr.h> #include <assert.h> +#include <os.h> /***************************************************************************** * Predictable pointer ballistics @@ -151,6 +152,8 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages ErrorF("(dix ptracc) invalid filter chain progression specified\n"); return; } + /* Block here to support runtime filter adjustment */ + OsBlockSignals(); for(fn = 0; fn < MAX_VELOCITY_FILTERS; fn++){ if(fn < stages){ InitFilterStage(&s->filters[fn], rdecay, lutsize); @@ -159,6 +162,10 @@ InitFilterChain(DeviceVelocityPtr s, float rdecay, float progression, int stages } rdecay /= progression; } + /* release again. Should the input loop be threaded, we also need + * memory release here (in princliple). + */ + OsReleaseSignals(); } @@ -199,7 +206,6 @@ InitFilterStage(FilterStagePtr s, float rdecay, int lutsize) float *oldlut; s->fading_lut_size = 0; /* prevent access */ - /* mb(); concurrency issues may arise */ if(lutsize > 0){ newlut = xalloc (sizeof(float)* lutsize); |